Getting Started
Welcome to the CMS API! This guide will help you set up your development environment and make your first API call.Prerequisites
Before you begin, ensure you have:- Docker Desktop (Windows/Mac) or Docker Engine (Linux)
- Docker Compose v2.0+
- Git for version control
- Make (for running project commands)
- Node.js 20+ (for frontend development)
- Postman or similar API client (optional)
Quick Start
1. Clone the Monorepo
2. Start Development Environment
The infrastructure is managed from thecms-docker and cms-lb repositories:
3. Initialize the API Database
Services:- API:
http://localhost:8080 - PostgreSQL:
localhost:5432(DB:cms_master) - Redis:
localhost:6379 - Elasticsearch:
http://localhost:9200(Search engine) - MinIO:
http://localhost:9000(Console:http://localhost:9001) - Adminer:
http://localhost:8081(Database UI)
cms-api directory, run the setup command:
local with your USER_PREFIX from cms-docker/.env):
| Service | URL |
|---|---|
| API | https://local.api.cms |
| Adminer (DB UI) | https://local.adminer.cms |
| MinIO Dashboard | https://local.dashboard.minio.cms |
| MinIO API | https://local.api.minio.cms |
4. Generate Development Token
APP_ENV=prod)
5. Make Your First API Call
Project Structure
Environment Variables
Environment variables are injected by Docker viacms-docker/compose.yaml. Key variables:
API Documentation
Swagger UI (Interactive)
Visithttps://local.api.cms/docs for interactive API documentation.
Features:
- Browse all endpoints
- Try API calls directly
- View request/response schemas
- See example payloads
OpenAPI Spec
Download:https://local.api.cms/docs.json (JSON format)
Common Commands
All commands are run from thecms-api directory using make:
Next Steps
Architecture
Understand the system architecture
Authentication
Learn about JWT authentication
API Reference
Browse complete API documentation
Multi-Tenancy
Understand tenant isolation
Troubleshooting
Services Not Starting
Database Connection Error
Check PostgreSQL is running:Permission Errors
Need Help?
- Technical Issues: Check .context/api/ for detailed documentation
- Architecture: See .context/global/architecture.md
- API Contracts: Read .context/api/endpoints.md
Next: Architecture Overview