Specflux Backend
specflux REST APIs and MCP server
Ask AI about Specflux Backend
Powered by Claude Β· Grounded in docs
I know everything about Specflux Backend. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
SpecFlux Backend
API server for SpecFlux - AI-Powered Multi-Repo Development Orchestrator.
API Overview
REST API for managing AI-assisted software development workflows:
| Resource | Description |
|---|---|
| Projects | Top-level containers grouping epics and tasks |
| PRDs | Product requirements documents with supporting files |
| Epics | Large features with acceptance criteria and task breakdown |
| Tasks | Individual work units with status, dependencies, and criteria |
| Repositories | Git repositories linked to projects |
| Skills | Claude Code skill definitions |
| Agents | Claude Code agent configurations |
All endpoints require Firebase JWT authentication.
API-First Development
This project follows API-first design. All endpoints are defined in the OpenAPI spec before implementation:
- Define endpoints in
src/main/resources/openapi/api.yaml - Run
mvn compileto generate controller interfaces - Implement the generated interfaces in controllers
When running locally, view the interactive spec at http://localhost:8090/swagger-ui.html
Prerequisites
- Java 25 (Temurin recommended)
- Maven 3.9+
- Docker (for PostgreSQL and Firebase emulator)
Java Installation (asdf)
asdf install java temurin-25.0.1+8.0.LTS
asdf set java temurin-25.0.1+8.0.LTS
Quick Start
mvn spring-boot:run
Docker Compose automatically starts PostgreSQL and Firebase Auth emulator.
The API will be available at http://localhost:8090
Tech Stack
- Spring Boot 4.0.0
- Java 25
- PostgreSQL
- Firebase Authentication
- Maven
Project Structure
This project follows Domain-Driven Design (DDD) with package-by-feature organization:
src/main/java/com/specflux/
βββ SpecFluxApplication.java # Main entry point
βββ shared/ # Shared kernel (base classes)
β βββ domain/ # Base domain classes
β βββ infrastructure/ # Cross-cutting concerns
βββ user/ # User bounded context
βββ project/ # Project bounded context
βββ epic/ # Epic bounded context
βββ task/ # Task bounded context
Each bounded context contains:
βββ domain/ # Core business logic
β βββ model/ # Entities, Value Objects, Aggregates
β βββ repository/ # Repository interfaces
β βββ service/ # Domain services
βββ application/ # Use cases
β βββ dto/ # Request/Response DTOs
β βββ mapper/ # Entity <-> DTO mappers
β βββ service/ # Application services
βββ infrastructure/ # Technical implementations
β βββ persistence/ # JPA repositories
β βββ external/ # External service adapters
βββ interfaces/ # Entry points
βββ rest/ # REST controllers
Development
Build
# Compile
mvn clean compile
# Run tests (uses Testcontainers)
mvn test
# Package
mvn package
Run
# Development mode (default profile: dev)
mvn spring-boot:run
# With specific profile
mvn spring-boot:run -Dspring-boot.run.profiles=dev
Code Formatting
This project uses Spotless with Google Java Format.
# Check formatting
mvn spotless:check
# Apply formatting
mvn spotless:apply
Configuration
Profiles
| Profile | Description | Usage |
|---|---|---|
dev | Local development | Default profile, debug logging |
test | Testing | Used by test classes, Testcontainers |
prod | Production | Minimal logging, Swagger disabled |
Environment Variables
| Variable | Description | Default |
|---|---|---|
SERVER_PORT | Server port | 8090 |
SPRING_PROFILES_ACTIVE | Active profile | dev |
DATABASE_URL | PostgreSQL URL | - |
DATABASE_USERNAME | Database username | - |
DATABASE_PASSWORD | Database password | - |
FIREBASE_PROJECT_ID | Firebase project ID | - |
GOOGLE_APPLICATION_CREDENTIALS | Path to Firebase service account JSON | - |
Troubleshooting
Port already in use
# Find process using port 8090
lsof -i :8090
# Kill it
kill -9 <PID>
Database connection issues
- Ensure PostgreSQL is running:
docker ps | grep postgres - Check connection:
psql -h localhost -U specflux -d specflux - Verify
application-dev.ymlhas correct credentials
Firebase emulator not connecting
- Ensure emulator is running:
firebase emulators:start --only auth - Check emulator UI at http://localhost:4000
- Verify
FIREBASE_AUTH_EMULATOR_HOST=localhost:9099is set
Tests failing with Testcontainers
- Ensure Docker is running
- Check Docker has sufficient resources
- Try
docker system pruneto clean up old containers
Documentation
- CONTRIBUTING.md β How to contribute
- CODE_OF_CONDUCT.md β Community guidelines
- SECURITY.md β Report vulnerabilities
License
Elastic License 2.0 β Free for personal use. Commercial use restricted.
