Implement: Project scaffolding, Go module, and configuration layer #13

Open
opened 2026-08-20 15:31:02 +02:00 by gaetan · 0 comments
Owner

Wayfinder map: #1
Dependencies: none (first ticket)

Description

Set up the project foundation: Go module, directory structure, configuration, and a minimal main entry point.

Tasks

  • Initialize Go module: go mod init knowledgify
  • Add modernc.org/sqlite dependency to go.mod
  • Create directory structure:
    • cmd/knowledgify/ — main entry point
    • internal/config/ — configuration package
    • internal/content/ — content loading package
    • internal/database/ — database layer package
    • internal/review/ — review engine package
    • web/handlers/ — HTTP handlers
    • web/templates/ — HTML templates
    • web/static/ — static assets (CSS, JS)
    • content/ — JSON content files
  • Config package (internal/config/):
    • Reads KNOWLEDGIFY_DB env var
    • Defaults to ./knowledgify.db
    • Exposes a simple config struct
  • Add .gitignore with knowledgify.db and build artifacts
  • Main entry point (cmd/knowledgify/main.go):
    • Prints "knowledgify starting" and exits
    • No server yet — just a working binary
  • Verify: go build ./cmd/knowledgify/ succeeds, binary runs and prints the message

Acceptance criteria

  • go build ./cmd/knowledgify/ succeeds
  • Binary runs and prints "knowledgify starting"
  • All directories exist
  • knowledgify.db is in .gitignore
**Wayfinder map:** #1 **Dependencies:** none (first ticket) ## Description Set up the project foundation: Go module, directory structure, configuration, and a minimal main entry point. ## Tasks - [ ] Initialize Go module: `go mod init knowledgify` - [ ] Add `modernc.org/sqlite` dependency to go.mod - [ ] Create directory structure: - `cmd/knowledgify/` — main entry point - `internal/config/` — configuration package - `internal/content/` — content loading package - `internal/database/` — database layer package - `internal/review/` — review engine package - `web/handlers/` — HTTP handlers - `web/templates/` — HTML templates - `web/static/` — static assets (CSS, JS) - `content/` — JSON content files - [ ] Config package (`internal/config/`): - Reads `KNOWLEDGIFY_DB` env var - Defaults to `./knowledgify.db` - Exposes a simple config struct - [ ] Add `.gitignore` with `knowledgify.db` and build artifacts - [ ] Main entry point (`cmd/knowledgify/main.go`): - Prints "knowledgify starting" and exits - No server yet — just a working binary - [ ] Verify: `go build ./cmd/knowledgify/` succeeds, binary runs and prints the message ## Acceptance criteria - `go build ./cmd/knowledgify/` succeeds - Binary runs and prints "knowledgify starting" - All directories exist - `knowledgify.db` is in .gitignore
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gaetan/knowledgify#13
No description provided.