Skip to content

rasouza/fullstack-hackathon-starter

Repository files navigation

Fullstack Hackathon Starter Monorepo

Dashboard

This monorepo is designed for rapid fullstack development, featuring a modern tech stack and best practices for scalable, maintainable apps.

🚀 Features

  • Turborepo: Fast monorepo build system with local and remote caching.
  • Backend: NestJS API with PostgreSQL, Prisma ORM, and Zod validation.
  • Frontend: TanStack Router React app with TanStack Query for data fetching.
  • API Contracts: ts-rest for end-to-end type-safe API contracts and clients.
  • UI Library: Shared component library using shadcn/ui and Tailwind CSS.
  • TypeScript: End-to-end type safety across all apps and packages.
  • ESLint & Prettier: Consistent code style and linting across the repo.
  • Docker Compose: Easy local development with PostgreSQL.

🗂️ Monorepo Structure

apps/
  backend/    # NestJS API (Node.js, Prisma, PostgreSQL)
  frontend/   # React app (TanStack Router, TanStack Query)
packages/
  api-contracts/   # ts-rest API contracts (shared types)
  eslint-config/   # Shared ESLint config
  typescript-config/ # Shared tsconfig
  ui/              # Shared React UI components

🛠️ Getting Started

1. Clone the repository

git clone https://github.com/rasouza/fullstack-hackathon-starter
cd fullstack-hackathon-starter

2. Install dependencies

npm install

3. Start the database with Docker Compose

docker compose up -d

This will start a local PostgreSQL instance.

4. Setup the monorepo

cp apps/backend/.env.example apps/backend/.env
npm run setup

The backend will be available at http://localhost:3001.

A OpenAPI spec is available at http://localhost:3001/docs

The frontend will be available at http://localhost:3000/dashboard.


🧩 Highlights

  • Type-Safe API: API routes and clients are generated from a single source of truth using ts-rest and Zod.
  • Modern Routing: File-based routing and layouts with TanStack Router.
  • Data Fetching: Integrated TanStack Query for React Query patterns.
  • Component Library: Reusable UI components with shadcn/ui and Tailwind CSS.
  • Prisma ORM: Type-safe database access and migrations.
  • Environment Validation: Zod-powered env validation for both frontend and backend.
  • Devtools: Built-in devtools for TanStack Router and Query.

🧪 Testing

Backend

cd apps/backend
npm test
npm test:e2e

Frontend

cd apps/frontend
npm test

📦 Useful Commands

  • Build all apps/packages:
    turbo build
  • Develop all apps/packages:
    turbo dev
  • Lint all code:
    turbo lint
  • Format all code:
    turbo format

📚 Resources

Libs tried before

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •