Skip to content
/ nova Public template
generated from lmiguelvargasf/nova-stack-mini

🌟 Modern full-stack template using Python (Litestar) and TypeScript (Next.js).

License

Notifications You must be signed in to change notification settings

lmiguelvargasf/nova

Repository files navigation

Nova 🌟

License: MIT Python TypeScript Node.js Next.js PostgreSQL Redis Celery GraphQL Docker Task Swift iOS

A full-stack application template with a Python (Litestar) backend and a TypeScript (Next.js) frontend, connected via GraphQL and REST, plus an optional SwiftUI iOS client. Ideal for hackathons and rapid prototyping, designed to smoothly evolve from a PoC into an MVP.

πŸ“š Table of Contents

πŸ› οΈ Tech Stack

Backend

  • Python – Core programming language for backend.
  • Litestar – High-performance ASGI framework for modern Python web apps.
  • Advanced Alchemy – SQLAlchemy integration (async) + migrations tooling.
  • GraphQL – API query language for flexible data fetching.
  • REST – Resource-oriented APIs over HTTP with JSON.
  • PostgreSQL – Advanced open-source relational database known for reliability.
  • Redis – In-memory data store for message brokering.
  • Celery – Distributed task queue for handling asynchronous background jobs.
  • Flower – Real-time monitoring for Celery workers.
  • uv – Ultra-fast Python package and project manager.
  • ruff – Extremely fast Python linter and code formatter.
  • ty – Fast, type-safe Python type checker.

Frontend

  • TypeScript – Core programming language for frontend.
  • Next.js – React framework for production-ready applications.
  • Tailwind CSS – Utility-first CSS framework for rapid UI development.
  • pnpm – Fast, disk space efficient package manager.
  • Storybook – Tool for building UI components and pages in isolation.
  • Vitest – Next generation testing framework.
  • Playwright – Reliable end-to-end testing for modern web apps.
  • Biome – Fast formatter and linter for JavaScript/TypeScript projects.

Tooling

  • Docker Desktop – Provides Docker Engine and Docker Compose.
  • mise – Manages tool versions.
  • Task – Task runner designed for modern workflows.
  • pre-commit – Manages and runs automated Git hooks.

Mobile (iOS)

  • Swift – Primary language for the iOS client.
  • SwiftUI – UI framework for modern iOS interfaces.
  • Xcode – IDE and simulator for iOS development.

πŸš€ Getting Started

Prerequisites

Scripted setup (recommended)

Run the setup script to install dependencies and configure the environment:

./setup.sh

Note: if you get permission denied, run chmod +x setup.sh then retry ./setup.sh.

After it finishes, start services in separate terminals:

task backend:dev
task worker:dev
task beat:dev
task frontend:dev

Optionally, monitoring:

task flower:dev

Step-by-step setup (manual)

Local environment

  1. Verify Docker is available:

    docker --version
    docker compose version
    docker info
  2. Install mise:

    curl https://mise.run | sh

    If this fails, see the official install docs.

  3. Install the project toolchain:

    mise install -y
  4. Install pre-commit hooks:

    pre-commit install
  5. Copy the example environment files:

    cp .env.example .env
    cp backend/.env.example backend/.env
    cp frontend/.env.local.example frontend/.env.local

Start services

  1. Pull database image:

    task infra:pull
  2. Start database service:

    task db:up
  3. Install backend dependencies:

    task backend:install
  4. Install frontend dependencies:

    task frontend:install
  5. Start backend:

    task backend:dev
  6. Create an initial admin user:

    task backend:create-admin-user
  7. Generate frontend code based on the backend API:

    task frontend:codegen
  8. Start frontend:

    task frontend:dev
  9. Start background worker:

    task worker:dev
  10. Start periodic task scheduler:

    task beat:dev
  11. Start monitoring (optional):

    task flower:up

The services will be available at:

πŸ’» Developer Experience

This project is pre-configured for VS Code (or any fork like Cursor or Windsurf) to provide a seamless development experience:

  • Type Checking: Since we use ty, the "python.languageServer" setting is set to "None" in .vscode/settings.json. This avoids running two language servers simultaneously when the Python extension is enabled (see official ty configuration).

πŸ“± iOS App

An iOS starter app lives in the ios directory.

  1. Open ios/ios.xcodeproj in Xcode.
  2. Select a simulator or device.
  3. Run the app from Xcode.

Key entry points:

πŸ“ Rules System

This project uses a canonical rule system to manage AI/LLM coding rules, first oriented to VS Code + GitHub Copilot (and compatible agents like Cursor or Antigravity).

AI Rules Hierarchy

  • Canonical rules are defined in .github/instructions/.
  • AGENTS.md provides a cross-agent routing layer that delegates to those canonical files.
  • backend/AGENTS.md provides backend-local scoping while still delegating to the canonical instruction files.
  • frontend/AGENTS.md provides frontend-local scoping while still delegating to the canonical instruction files.
  • ios/AGENTS.md provides iOS-local scoping while still delegating to the canonical instruction files.

🌐 Production Deployment

This is an opinionated deployment recommendation that has worked well in production, but you are free to deploy this template using any providers or infrastructure that fit your needs.

This template has been deployed successfully with the frontend on Vercel and the backend + database on Render.

See full deployment details in docs/deployment.md.

βš™οΈ Development Tasks

This project uses Task to simplify common development workflows. The main Taskfile.yml in the project root provides commands for:

  • Managing the Docker environment (for example, building, starting, or stopping services).
  • Running development tasks within the backend and frontend services (such as linting, formatting, or testing).
  • Managing background workers (Celery worker and beat).
  • Inspecting worktree-specific infrastructure settings with task infra:env.
  • Running full-stack validation with task validate.

To list all available tasks, run:

task --list

πŸ”„ CI/CD Workflows

This project uses GitHub Actions for continuous integration and validation:

  • PR Validation: Enforce PR title conventions and limit PR size.
  • CI Workflow: Run tests and linting on both frontend and backend.

For detailed information about our CI/CD workflows, see the workflows documentation.

πŸ“¦ Releases

All versioned changes are documented on the GitHub Releases page.

πŸ“„ License

This project is licensed under the MIT License.