feat(T01): bootstrap IHP v1.5 project scaffold

Merged ihp-new generated scaffold into repo. Sets appName to inter-hub,
adds Nix flake with IHP inputs, devenv config, and standard IHP project
structure. Nix + ihp-new + direnv installed system-wide.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 01:36:18 +00:00
parent 8b6ce5bbc8
commit ff11913d5c
32 changed files with 3247 additions and 173 deletions

23
Test/Integration.hs Normal file
View File

@@ -0,0 +1,23 @@
module Main where
import Test.Hspec
import IHP.Prelude
import IHP.ModelSupport
import IHP.Log.Types
import System.Environment (lookupEnv)
-- Integration tests run with a temporary PostgreSQL database.
-- The DATABASE_URL env var is set automatically by `nix flake check`.
-- See: https://ihp.digitallyinduced.com/Guide/testing.html
main :: IO ()
main = do
databaseUrl <- lookupEnv "DATABASE_URL" >>= \case
Just url -> pure (cs url)
Nothing -> error "DATABASE_URL not set. Run `devenv up` first or use `nix flake check`."
logger <- newLogger def { level = Warn }
withModelContext databaseUrl logger \modelContext -> do
let ?modelContext = modelContext
hspec do
describe "Database" do
it "can execute a query" do
sqlExecDiscardResult "SELECT 1" ()

13
Test/Main.hs Normal file
View File

@@ -0,0 +1,13 @@
module Main where
import Test.Hspec
import IHP.Prelude
-- Import your test specs here:
-- import Test.MySpec
main :: IO ()
main = hspec do
describe "Example" do
it "should pass" do
1 + 1 `shouldBe` (2 :: Int)