A simple, self-hosted blogging platform built with modern web technologies.
- ✍️ Write & Publish — Create and publish articles with a rich text editor
- 📅 Schedule Posts — Schedule articles to be published at a specific date and time
- 🤖 AI Writing Assistant — Generate articles using AI to help you write faster
- 📊 Analytics — Track your blog performance (coming soon)
- TanStack Start — Full-stack React framework
- Drizzle ORM — TypeScript ORM
- PostgreSQL — Database
- Tailwind CSS — Styling
- Node.js 18+
- PostgreSQL database
- pnpm
- Docker & Docker Compose (optional, for containerized deployment)
# Clone the repository
git clone https://github.com/Alexandre-Chs/blog.git
cd blog
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Edit .env and configure your database URLsRun the application in development mode with hot-reload:
# Option 1: Run dev server only
pnpm dev
# Option 2: Run dev server + Drizzle Studio (database UI)
./bin/start.sh devThe app will be available at http://localhost:3000.
Drizzle Studio (if started) will be available at http://localhost:4983.
Run the application in a Docker container:
# Start Docker containers
./bin/start.sh
# Or explicitly specify production mode
./bin/start.sh prod
# Stop Docker containers
./bin/stop.shThe app will be available at http://localhost.
# Generate migration files from schema changes
pnpm db:generate
# Run migrations on production database (uses DATABASE_URL_PROD)
./bin/migrate.sh
# Push schema changes directly (development only)
pnpm db:push# Open Drizzle Studio (database UI)
pnpm db:studio
# Build the application
pnpm build
# Start the built application
pnpm startCreate a .env file based on .env.example:
# Development database
DATABASE_URL=postgresql://user:password@localhost:5432/blog
# Production database (used by migrations)
DATABASE_URL_PROD=postgresql://user:password@localhost:5432/blog_prodMIT