A full-stack starter template for building modern web applications with SvelteKit frontend and NestJS backend API in a monorepo structure.
git clone https://github.com/yourusername/sveltekit-nestjs-starter.git
cd sveltekit-nestjs-starter
npm install
cp .env.example .env
Update the .env
file with your database credentials and other configuration.
npm run dev
This will start both the frontend and backend in development mode.
You can also use Docker to run the entire application stack:
docker-compose up -d
āāā apps/
ā āāā api/ # NestJS backend
ā ā āāā prisma/ # Prisma schema and migrations
ā ā āāā src/ # Backend source code
ā āāā frontend/ # SvelteKit frontend
ā āāā src/ # Frontend source code
āāā packages/ # Shared packages
āāā docker-compose.yml # Docker configuration
# Start backend in development mode
npm run dev:api
# Run backend tests
npm run test --workspace=apps/api
# Generate Prisma client
cd apps/api && npx prisma generate
# Run database migrations
cd apps/api && npx prisma migrate dev
# Start frontend in development mode
npm run dev:web
# Build frontend for production
npm run build:web
The easiest way to deploy this application is using the Railway button at the top of this README. This will automatically set up all the necessary services.
You can also deploy the application manually:
npm run build
cd apps/api && npm run start:prod
cd apps/frontend && npm run preview
/
- Home pageThis project is licensed under the MIT License - see the LICENSE file for details.