How spartan-ng/spartan works
Project type and purpose
• This is an Nx-based monorepo hosting two major concerns:
• spartan/ui – an Angular UI library of un-styled “brain” primitives plus styled “helm” components (in libs/brain and libs/ui).
• spartan/stack – a full-stack example app (in apps/app) built with AnalogJS (Nitro server), Angular, Tailwind, tRPC, Drizzle ORM and Supabase.
• In addition there is an Nx-CLI plugin (libs/cli), tooling for docs/release (libs/tools), Storybook & E2E test apps (apps/ui-storybook-e2e, apps/trpc-app-e2e), and CI/CD pipeline definitions under .github/workflows.
File structure
• Top-level “apps” folder for runnable projects:
• app – the example full-stack Angular/Analog application
• ui-storybook-e2e – Cypress tests against Storybook
• trpc-app-e2e – end-to-end tests for the tRPC API
• “libs” folder for shareable code:
• libs/brain – un-styled Angular CDK–based primitives
• libs/ui – “helm” libraries that layer styling on top of brain primitives
• libs/cli – an Nx plugin / Angular CLI extension to scaffold spartan/ui into a workspace
• libs/tools – custom executors & generators for docs and release automation
• libs/trpc – shared tRPC client/server utilities
• Configuration and scripts: Nx workspace files (nx.json, project.json), GitHub workflows, Storybook configs, Jest and Cypress configs, Drizzle migrations under apps/app/drizzle.
README for additional insights
• The README clearly states two focal points:
a. “spartan/ui” – port of shadcn/ui to Angular, built as paired brain/helm libs
b. “spartan/stack” – an example full-stack application demonstrating Supabase, Drizzle, Analog, tRPC, Angular, Tailwind, Nx
• Storybook is the primary development environment for UI primitives.
• E2E tests run against Storybook and the example app.
• CI workflows automate testing, releases, nightly builds.
Final advice
• Essential architectural boundaries: front end vs server vs data vs packages vs CI.