This project is a fullstack blog application built with a modern and powerful technology stack using TypeScript. It is organized as a monorepo using Turborepo, with separate frontend and backend applications.
- 🧑💻 Frontend: Next.js with ShadCN UI for a sleek and responsive user interface.
- ⚙️ Backend: NestJS framework providing REST API and GraphQL endpoints.
- 📝 Language: TypeScript for both frontend and backend development.
- 🗄️ Database: Prisma ORM managing SQLite for local development and PostgreSQL for production.
- 🔐 Authentication: Google OAuth for secure user authentication and authorization.
- 📦 Monorepo: Managed with Turborepo for efficient builds and development.
- ☁️ Cloud: AWS for deployment and hosting.
- User authentication and authorization via Google OAuth.
- CRUD operations for blog posts and comments.
- Support for both REST API and GraphQL API.
- Responsive UI built with ShadCN UI components.
- Database schema managed with Prisma ORM.
- Supports SQLite for local development and PostgreSQL for production.
- Efficient monorepo structure with Turborepo.
- Node.js (v16 or higher)
- npm or yarn
- Docker (optional, for PostgreSQL)
- AWS account (for deployment)
-
Clone the repository:
git clone git@github.com:chaad98/blog.git cd blog -
Install dependencies:
npm install
-
Set up environment variables:
Create
.envfiles inapps/frontendandapps/backendwith necessary variables such as:DATABASE_URLfor PostgreSQL connection- Google OAuth client ID and secret
- AWS credentials
-
Run database migrations:
npx prisma migrate dev --schema=apps/backend/prisma/schema.prisma
-
Seed the database (optional):
npm run db:seed --workspace=apps/backend
-
Start the backend server:
npm run dev --workspace=apps/backend
-
Start the frontend server:
npm run dev --workspace=apps/frontend
The project is configured to deploy on AWS. Refer to the deployment documentation for detailed instructions.
apps/frontend: Next.js frontend applicationapps/backend: NestJS backend application with Prisma ORMapps/backend/prisma: Prisma schema and migrationsapps/backend/src: Backend source codeapps/frontend/src: Frontend source code