Skip to content

Getting Started

Source of truth:

  • d3chat/README.md
  • d3chat/backend/app/main.py
  • d3chat/docker-compose*.yml

Prerequisites

  • Docker + Docker Compose (recommended path)
  • Node.js 20+ (frontend local dev)
  • Python 3.12+ (backend local dev)
  • PostgreSQL 16 and Redis 7 (if not using Docker for infra)

Fastest Local Startup (Docker)

Terminal window
git clone https://github.com/matdemers1/d3chat.git
cd d3chat
cp .env.example .env
# Set SECRET_KEY and other values in .env
docker compose up --build

After startup:

  • Frontend: http://localhost:3000
  • API docs: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc
  • Health: http://localhost:8000/health

First Login and Admin Access

On first backend startup, if no local superadmin exists, d3chat creates:

  • Username: admin
  • Password: Change_Me_123
  • Role: superadmin

Immediately change this password after first login.

You can change password via:

  • UI profile settings, or
  • POST /api/v1/users/me/password

Split Dev Workflow (No Full Docker)

Use Docker only for infra and run backend/frontend directly.

1. Start PostgreSQL + Redis

Terminal window
docker compose -f docker-compose.infra.yml up -d

2. Start backend

Terminal window
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
alembic upgrade head
uvicorn app.main:app --reload

3. Start frontend

Terminal window
cd frontend
npm install
npm run dev

Required Environment Variables

Minimum values to set in .env:

  • SECRET_KEY
  • DATABASE_URL
  • REDIS_URL
  • SERVER_DOMAIN
  • VITE_API_URL
  • VITE_WS_URL

For federation in non-local environments:

  • SIGNING_KEY_SEED (optional but recommended)
  • API_BASE_URL

Smoke Test Checklist

  1. Register a user via UI or POST /api/v1/auth/register.
  2. Log in and confirm chat UI loads.
  3. Create a channel and send a message.
  4. Open second browser session and confirm real-time delivery.
  5. Visit admin routes as superadmin and verify dashboard loads.