This project was created with Better-T-Stack, a modern TypeScript stack that combines Fastify, and more.
- TypeScript - For type safety and improved developer experience
- Fastify - Fast, low-overhead web framework
- Bun - Runtime environment
- Mongoose - TypeScript-first ORM
- MongoDB - Database engine
- Authentication - Better-Auth
- Turborepo - Optimized monorepo build system
First, install the dependencies:
npm installThis project uses MongoDB with Mongoose.
-
Make sure you have MongoDB set up.
-
Update your
apps/server/.envfile with your MongoDB connection URI. -
Apply the schema to your database:
npm run db:pushThen, run the development server:
npm run devThe API is running at http://localhost:3000.
ams-backend/
├── apps/
│ └── server/ # Backend API (Fastify)
├── packages/
│ ├── api/ # API layer / business logic
│ ├── auth/ # Authentication configuration & logic
│ └── db/ # Database schema & queries
npm run dev: Start all applications in development modenpm run build: Build all applicationsnpm run dev:web: Start only the web applicationnpm run dev:server: Start only the servernpm run check-types: Check TypeScript types across all appsnpm run db:push: Push schema changes to databasenpm run db:studio: Open database studio UI