MedInfo Nigeria is a healthcare platform designed to connect patients with certified doctors, provide medical information, and facilitate virtual consultations.
- Frontend: Next.js 16 (App Router), React 19, TailwindCSS 4, Zustand, TanStack Query
- Backend: Hono.js (Node.js), PostgreSQL 18, Drizzle ORM, Zod, Redis 8
- Monorepo: pnpm workspaces
- Shared Packages:
@medinfo/db,@medinfo/env,@medinfo/shared
- Docker Engine / Docker Desktop
- Node.js 18+
- pnpm 10.33.3+
-
Clone the repository
git clone <repo-url> cd medinfo pnpm install
-
Configure environment variables
cp apps/backend/.env.example apps/backend/.env
You will need to configure the following external services in your
.envfile:- Google OAuth (Client ID & Secret)
- Cloudinary (Cloud Name, API Key & Secret)
- Zoom API (Account ID, Client ID & Secret)
- Resend Email Service (Optional)
Generate local secrets for JWT:
ACCESS_SECRET=your-access-secret-min-32-chars REFRESH_SECRET=your-refresh-secret-min-32-chars
-
Start Docker services
docker compose up -d
Wait until services are healthy. You can check the status using
docker compose ps. -
Initialize the database
pnpm db:generate pnpm db:migrate pnpm db:seed # Optional -
Start the frontend development server
pnpm dev:frontend
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: Bruno Collection at
apps/backend/(bruno)-(medinfo)
All backend services, including the API server, database, and cache, are configured to run in Docker containers.
| Service | Container | Port | Purpose |
|---|---|---|---|
| PostgreSQL | medinfo-postgres-db |
5432 | Primary database |
| Redis Cache | medinfo-redis-cache |
6379 | Session storage |
| Redis Queue | medinfo-redis-queue |
6380 | Job processing |
| Backend API | medinfo-backend |
8000 | API server |
Docker
docker compose up -d # Start all services
docker compose down # Stop all services
docker compose logs -f backend # View backend logs
docker compose restart backend # Restart backend containerDatabase
pnpm db:generate # Generate Drizzle schema
pnpm db:migrate # Run migrations
pnpm db:seed # Seed sample data
pnpm db:studio # Open Drizzle StudioLinting and Formatting
pnpm lint:eslint
pnpm lint:format
pnpm lint:type-checkIf services fail to start, check for local processes using ports 5432, 6379, 6380, or 8000. Stop conflicting local services or modify the exposed ports in docker-compose.yaml.
To test the database connection directly from the backend container:
docker compose exec backend node -e "
const { Client } = require('pg');
const client = new Client({ connectionString: process.env.DATABASE_URL_DEV });
client.connect().then(() => console.log('Connected')).finally(() => client.end());"Check backend logs for missing environment variables:
docker compose logs backend | grep "Missing required environment variable"For more detailed guides, see the troubleshooting documentation.
medinfo/
├── apps/
│ ├── backend/ # Hono API Server
│ └── frontend/ # Next.js Application
├── packages/
│ ├── db/ # Database Schema & Migrations
│ ├── env/ # Environment Validation
│ └── shared/ # Shared Types & Schemas
├── docs/ # Documentation
├── docker-compose.yaml # Docker configuration
└── README.md
- Fork the repository
- Create a feature branch
- Implement your changes
- Run tests and linting checks
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for details.