A modern blogging platform built with Next.js, TypeScript, and PostgreSQL.
Login credentials: admin randompass02
- User authentication and profiles
- Create and publish blog posts
- Comment, likes on posts
- Optimistic updates (from React)
- Markdown for writing posts
- Responsive design
- Proper SEO support
- Frontend & Backend: Next.js 15 (App Router)
- Language: TypeScript
- Database: PostgreSQL
- ORM: Prisma
- Authentication: Clerk
- Styling: Tailwind CSS
- Node.js 18+ and pnpm
- Docker and Docker Compose
git clone <repository-url>
cd writepnpm installCopy the example env file and update it with your own values:
cp example.env .envRequired environment variables:
- Database connection strings
- Clerk API keys (for authentication)
The project includes a Docker Compose configuration for PostgreSQL. Start the database with:
docker-compose up -dThis will:
- Start a PostgreSQL container
- Create a database named
mydb - Set up a user with username
userand passwordpassword - Expose the database on port
5432
You can connect to the database using the following connection string:
postgresql://user:password@localhost:5432/mydb
pnpm prisma migrate devpnpm devYour application will be available at http://localhost:3000.
/src
/app - Next.js application routes
/components - React components
/lib - Utility functions and shared code
/prisma - Prisma schema and migrations
/public - Static assets
This application can be deployed to platforms like Vercel or any platform that supports Next.js.
For the database, you can use:
- A managed PostgreSQL service (like Neon, Supabase, or Railway)
- Self-hosted PostgreSQL on a cloud provider
Update your .env file with production database credentials before deploying.