Skip to content

ghostlexly/ultimate-typescript-starter-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Ultimate TypeScript Full Stack Starter

๐ŸŒŸ Overview

Welcome to the Ultimate TypeScript Full Stack Starter! This toolkit provides a robust foundation for building scalable, featureโ€‘rich applications using NestJS, Next.js, PostgreSQL, and Prisma โ€” all written in TypeScript.

๐ŸŽฏ Why Choose This Starter?

  • Full Stack: Backend (NestJS) + Frontend (Next.js)
  • TypeScript: Static typing and great DX
  • Batteries Included: Productionโ€‘minded defaults
  • Scalable: Modular architecture and modern tooling

๐Ÿ›  Tech Stack

  • Database: PostgreSQL with Prisma ORM
  • Backend: NestJS (running on Express platform)
  • Frontend: Next.js (SSR/SSG/CSR)
  • Language: TypeScript
  • Containers/Proxy: Docker + Caddy

๐Ÿ”‘ Key Features

๐Ÿ–ฅ Backend

  • Authentication: JWT (with rotating tokens) with @nestjs/passport and passport-jwt
  • Authorization: Roleโ€‘based via custom RolesGuard and @Roles decorator
  • Validation: Zod via ZodValidationPipe
  • Error Handling: Centralized UnhandledExceptionsFilter
  • Observability: Sentry integration
  • File Management: S3 integration for file and video uploads
  • Video Processing: FFmpeg encoding for webโ€‘compatible formats
  • Caching: Redis via @nestjs/cache-manager
  • Rate Limiting: @nestjs/throttler with proxy support
  • Background Jobs: BullMQ queues and workers

๐ŸŽจ Frontend

  • Framework: React 19 with Next.js 15
  • Styling: Tailwind CSS and MUI
  • Data/Forms: TanStack Query and React Hook Form

๐Ÿ”’ Security

  • Sensible security headers (Helmet)
  • JWTโ€‘based auth with tokens rotation
  • Input validation
  • Throttling

โšก Developer Experience

  • Docker Compose for local dev (Caddy reverse proxy)
  • ESLint + Prettier
  • Hotโ€‘reload for backend and frontend

๐Ÿš€ Getting Started

  1. Clone the repository

    git clone https://github.com/ghostlexly/ultimate-typescript-starter-kit.git
    cd ultimate-typescript-starter-kit
    
  2. Create a .env file (repo root) Provide the variables used by compose.yml (examples):

    APP_PORT=3000
    APP_BASE_URL=http://localhost
    APP_DATABASE_CONNECTION_URL=postgresql://lunisoft:${POSTGRES_PASSWORD}@postgres:5432/${PROJECT_NAME}
    APP_REDIS_HOST=redis
    APP_REDIS_PORT=6379
    APP_JWT_PRIVATE_KEY=base64-encoded-private-key
    APP_JWT_PUBLIC_KEY=base64-encoded-public-key
    API_S3_ENDPOINT=http://minio:9000
    API_S3_ACCESS_KEY=changeme
    API_S3_SECRET_KEY=changeme
    API_S3_BUCKET=uploads
    API_GOOGLE_CLIENT_ID=
    API_GOOGLE_CLIENT_SECRET=
    POSTGRES_PASSWORD=changeme
    PROJECT_NAME=ultimate_ts_starter
    
  3. Install dependencies (optional for local nonโ€‘Docker runs)

    cd backend && npm install
    cd ../frontend && npm install
    
  4. Start the stack

    docker compose up
    
  5. Initialize the database schema

    docker compose exec backend npx prisma migrate deploy
    
  6. Access the application

๐Ÿ“š Documentation

For detailed docs, see:

๐Ÿค Contributing

We welcome contributions!

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ“ž Support

If you have any questions or need help, please open an issue or contact our team at [email protected].


Happy coding! ๐ŸŽ‰ Don't forget to star โญ this repo if you find it useful!

About

๐ŸŒŸ Battle ready ultimate nestjs & nextjs typescript starter kit (REST API) ๐ŸŒŸ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published