NobGit
public anord read

Ledger

Why work hard when you can work easier?

Languages

Repository composition by tracked source files.

TypeScript
TypeScript 86% CSS 10% SQL 3% Shell 1% HTML 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/anord/ledger.git
ssh://[email protected]:2222/orgs/anord/ledger.git

Trace

apps/api/src/http/routes/setup.ts

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

setup.ts on main
Author Date Commit Line Code
Alex Nord 3 months ago 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
1
import { Router } from "express";
Open commit View diff
1 import { Router } from "express";
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
2
import { z } from "zod";
Open commit View diff
2 import { z } from "zod";
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
3
import { env, isProduction } from "../../config/env.js";
Open commit View diff
3 import { env, isProduction } from "../../config/env.js";
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
4
import { initializeLedger, getSetupStatus } from "../../services/setup.js";
Open commit View diff
4 import { initializeLedger, getSetupStatus } from "../../services/setup.js";
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
5
Open commit View diff
5
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
6
const setupSchema = z.object({
Open commit View diff
6 const setupSchema = z.object({
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
7
  siteName: z.string().min(2),
Open commit View diff
7 siteName: z.string().min(2),
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
8
  brandColor: z.string().regex(/^#[0-9a-fA-F]{6}$/),
Open commit View diff
8 brandColor: z.string().regex(/^#[0-9a-fA-F]{6}$/),
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
9
  publicKnowledgeBaseEnabled: z.boolean(),
Open commit View diff
9 publicKnowledgeBaseEnabled: z.boolean(),
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
10
  ownerEmail: z.string().email(),
Open commit View diff
10 ownerEmail: z.string().email(),
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
11
  ownerDisplayName: z.string().min(2),
Open commit View diff
11 ownerDisplayName: z.string().min(2),
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
12
  password: z.string().min(8)
Open commit View diff
12 password: z.string().min(8)
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
13
});
Open commit View diff
13 });
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
14
Open commit View diff
14
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
15
export const setupRouter = Router();
Open commit View diff
15 export const setupRouter = Router();
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
16
Open commit View diff
16
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
17
setupRouter.get("/status", async (_req, res) => {
Open commit View diff
17 setupRouter.get("/status", async (_req, res) => {
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
18
  const status = await getSetupStatus();
Open commit View diff
18 const status = await getSetupStatus();
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
19
  return res.json(status);
Open commit View diff
19 return res.json(status);
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
20
});
Open commit View diff
20 });
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
21
Open commit View diff
21
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
22
setupRouter.post("/initialize", async (req, res) => {
Open commit View diff
22 setupRouter.post("/initialize", async (req, res) => {
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
23
  const input = setupSchema.parse(req.body);
Open commit View diff
23 const input = setupSchema.parse(req.body);
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
24
  const result = await initializeLedger(input);
Open commit View diff
24 const result = await initializeLedger(input);
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
25
Open commit View diff
25
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
26
  res.cookie(env.SESSION_COOKIE_NAME, result.token, {
Open commit View diff
26 res.cookie(env.SESSION_COOKIE_NAME, result.token, {
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
27
    httpOnly: true,
Open commit View diff
27 httpOnly: true,
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
28
    sameSite: "lax",
Open commit View diff
28 sameSite: "lax",
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
29
    secure: isProduction
Open commit View diff
29 secure: isProduction
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
30
  });
Open commit View diff
30 });
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
31
Open commit View diff
31
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
32
  return res.status(201).json({ user: result.user });
Open commit View diff
32 return res.status(201).json({ user: result.user });
same change 462c463

Add first-run setup and gate demo seed behind config

Full commit hash
462c463a79b4fe09e752f88c5c4eca69dac468fc
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
33
});
Open commit View diff
33 });