๐ Getting Started¶
This guide will help you get your local development environment set up and running.
๐ ๏ธ Prerequisites¶
Before you begin, ensure you have the following installed:
- Node.js: v24 or higher (LTS recommended)
- pnpm: v10 or higher
- Git: For version control
- Docker: Optional (required for "Production Mirror" mode)
๐ฅ Installation¶
- Clone the repository:
- Run the Setup Script: This project features a one-click bootstrap command that installs dependencies, generates Prisma clients, and applies database migrations.
โ๏ธ Environment Configuration¶
You must configure the environment variables for the backend to function correctly.
- Navigate to the backend directory:
- Create a
.envfile (you can copy.env.exampleif it exists):
DATABASE_URL="postgresql://user:password@neon-host.neon.tech/audience_builder?sslmode=require"
JWT_SECRET="your-high-entropy-secret"
GROQ_API_KEY="your-groq-console-api-key"
PORT=3000
๐ Running the Application¶
Local Development Mode¶
This mode provides the fastest feedback loop with Instant HMR (Hot Module Replacement).
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
Production Mirror Mode (Docker)¶
To verify how the application behaves in a containerized environment:
๐๏ธ Database Management¶
We use PostgreSQL (Neon) and Prisma. For local development, you can either use a local PostgreSQL instance or a free tier project on Neon.tech.
[!TIP] Neon Setup: When using Neon, ensure your
DATABASE_URLincludes?sslmode=require.
- View Data: Use Prisma Studio to inspect your database visually.
- Seeding: To populate the database with initial taxonomy data:
๐งช Testing¶
Run the full test suite across the monorepo:
For interactive testing in watch mode:
๐ Documentation¶
The project documentation is managed with MkDocs.
- Live Site: https://chitrank2050.github.io/audience-builder/
- Local Preview:
The documentation will be available at http://localhost:8000.