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.
- Full Stack: Backend (NestJS) + Frontend (Next.js)
- TypeScript: Static typing and great DX
- Batteries Included: Productionโminded defaults
- Scalable: Modular architecture and modern tooling
- Database: PostgreSQL with Prisma ORM
- Backend: NestJS (running on Express platform)
- Frontend: Next.js (SSR/SSG/CSR)
- Language: TypeScript
- Containers/Proxy: Docker + Caddy
- Authentication: JWT (with rotating tokens) with
@nestjs/passport
andpassport-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
- Framework: React 19 with Next.js 15
- Styling: Tailwind CSS and MUI
- Data/Forms: TanStack Query and React Hook Form
- Sensible security headers (Helmet)
- JWTโbased auth with tokens rotation
- Input validation
- Throttling
- Docker Compose for local dev (Caddy reverse proxy)
- ESLint + Prettier
- Hotโreload for backend and frontend
-
Clone the repository
git clone https://github.com/ghostlexly/ultimate-typescript-starter-kit.git cd ultimate-typescript-starter-kit
-
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
-
Install dependencies (optional for local nonโDocker runs)
cd backend && npm install cd ../frontend && npm install
-
Start the stack
docker compose up
-
Initialize the database schema
docker compose exec backend npx prisma migrate deploy
-
Access the application
- Frontend: http://localhost
- Backend: http://localhost/api
For detailed docs, see:
We welcome contributions!
This project is licensed under the MIT License.
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!