Directory Structure (Blueprint)
The Dracory Blueprint is the recommended starter layout for new Dracory apps. It provides clear separation of concerns and follows Go standard project layout patterns.
Root
Top-level folders in the Blueprint repository:
- .github/ – CI workflows, e.g.,
workflows/tests.yml
. - .vscode/ – Editor settings and launch configs.
- cmd/ – CLI apps (e.g.,
deploy
,envenc
,snakecase
). - internal/ – Application code (app boot, controllers, stores, etc.).
- pkg/ – Reusable packages exported for import by other projects.
- Project files:
main.go
,go.mod
,Dockerfile
,taskfile.yml
, etc.
Internal
Key internal packages (Blueprint):
- internal/app/ – App bootstrap, lifecycle, stores wiring, migrations.
- internal/cache/ – Cache interfaces and implementations.
- internal/cli/ – CLI entry points and flags;
cli.go
bundles commands. - internal/controllers/ – Admin/Website controllers and their routes.
- internal/helpers/ – Shared helpers and utilities.
- internal/links/ – Centralized route constants.
- internal/testutils/ – Test environment and HTTP helpers (migrated from base package as per project policy).
- internal/types/ – Shared interfaces and type definitions.
- internal/config/ – Env keys and config loader (
contstants.go
,load.go
).
pkg
Selected reusable packages included with the Blueprint:
- pkg/blogblocks/ – Block editor definitions.
- pkg/blogtheme/ – Theme components (images, links, headings).
- pkg/pool/ – Worker pool and build cache helpers.
- pkg/testimonials/ – Testimonial types and list handling.
Note: Other repos (like this website) may contain additional pkg/*
modules (e.g., pkg/gos/
). The Blueprint focuses on essentials.
Configuration
Configuration is env-driven and loaded from .env
via internal/config/load.go
. Env keys are defined in internal/config/contstants.go
.
Assets & Templates
The Blueprint itself does not ship with public/
or views/
by default. Applications created from the Blueprint typically add these as needed.
cmd
Command-line applications (e.g., deployment tooling and environment variable encryption utilities).