A modern blog platform built with Next.js, utilizing SST for infrastructure, Drizzle ORM for database operations, and Neon PostgreSQL for the database.
- Node.js 18+ installed
- AWS account configured
- Neon PostgreSQL database created
- pnpm package manager
- Install pnpm globally:
npm install -g pnpm
- Install dependencies:
pnpm install
- Set up environment variables:
cp .env.local
DATABASE_URL=your_neon_postgres_connection_string
NEXT_PUBLIC_URL=http://localhost:3000
- Generate and push Drizzle ORM schema:
drizzle-kit generate
drizzle-kit push
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── blog/ # Blog pages
│ └── components/ # Shared components
├── lib/ # Utility functions and configurations
│ ├── db.ts # Database connection
│ └── schema.ts # Drizzle schema definitions
├── migrations/ # Database migrations
├── sst.config.ts # SST configuration
└── drizzle.config.ts # Drizzle ORM configuration
- Create a Neon PostgreSQL database at neon.tech
- Get your connection string from the Neon dashboard
- Add the connection string to your
.env.local
file - Run migrations to set up your database schema
This project uses SST v3 for infrastructure management. Key components:
- Configure your AWS credentials
- Update
sst.config.ts
with your stack settings - Deploy to AWS:
pnpm deploy
sst secret set DATABASE_URL <your_neon_postgres_connection_string> --env <environment>
sst secret set NEXT_PUBLIC_URL <your_next_public_url> --env <environment>
- Fork the repository
- Create a feature branch or create an issue
- Submit a pull request