A professional survey platform specialized for the IT industry, inspired by the StackOverflow Developer Survey. Built with Spring Boot and DDD principles.
- Overview
- Architecture
- Class Diagram
- Tech Stack
- Key Features
- Getting Started
- Development
- Testing
- API Documentation
State of dev is a robust survey platform designed specifically for gathering insights from the IT industry. It provides hierarchical survey structuring with subjects and sub-subjects, supporting different types of questions and tracking answer statistics across yearly editions.
The project follows Domain-Driven Design (DDD) principles and is built using Spring Modulith for a modular monolith architecture.
- Survey Management (Core Domain)
- Identity and Access (Supporting Domain)
- Java 21
- Spring Boot 3.2.0
- Spring Modulith
- Spring Cache with Redis
- PostgreSQL 16
- Redis 7.2
- Docker & Docker Compose
- Test-Driven Development (TDD)
- Domain-Driven Design (DDD)
- Maven
- JUnit 5
- AssertJ
- OpenAPI 3.0
- Swagger UI
- 📊 Hierarchical survey structure
- 📅 Yearly survey editions
- 📋 Multiple question types (Single/Multiple choice)
- 📈 Answer statistics tracking
- 🔐 Secure owner authentication
- 📊 Analytics capabilities
- 🚀 Redis caching for improved performance
- JDK 21
- Docker & Docker Compose
- Maven 3.8+
- Clone the repository
git clone https://github.com/yourusername/itlens.git
cd itlens
- Start the PostgreSQL and Redis containers
docker-compose up -d
- Build the application
./mvnw clean install
- Run the application
./mvnw spring-boot:run
The application will be available at http://localhost:8080
itlens/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/itlens/
│ │ │ ├── survey/
│ │ │ ├── identity/
│ │ │ └── analytics/
│ │ └── resources/
│ └── test/
└── docker/
# Surveys
GET /api/v1/surveys # List all surveys
POST /api/v1/surveys # Create new survey
GET /api/v1/surveys/{id} # Get survey by ID
PUT /api/v1/surveys/{id} # Update survey
DELETE /api/v1/surveys/{id} # Delete survey
# Survey Editions
GET /api/v1/surveys/{id}/editions # List editions for survey
POST /api/v1/surveys/{id}/editions # Create new edition
GET /api/v1/surveys/{id}/editions/{eid} # Get specific edition
PUT /api/v1/surveys/{id}/editions/{eid} # Update edition
DELETE /api/v1/surveys/{id}/editions/{eid} # Delete edition
# Subjects
GET /api/v1/subjects # List all subjects
POST /api/v1/subjects # Create new subject
GET /api/v1/subjects/{id} # Get subject by ID
POST /api/v1/subjects/{id}/sub-subjects # Create sub-subject
GET /api/v1/subjects/{id}/questions # List questions in subject
# Questions
POST /api/v1/questions # Create question
PUT /api/v1/questions/{id} # Update question
DELETE /api/v1/questions/{id} # Delete question
POST /api/v1/questions/{id}/answers # Add answer option
Example Request/Response:
# POST /api/v1/surveys
Request:
{
"title": "Developer Survey 2024",
"description": "Annual developer survey to gather insights about IT industry trends"
}
Response:
{
"id": 1,
"title": "Developer Survey 2024",
"description": "Annual developer survey to gather insights about IT industry trends",
"createdAt": "2024-01-01T10:00:00Z",
"status": "DRAFT"
}
Redis is used to cache:
- Survey templates
- Active survey editions
- Frequently accessed subjects
- Answer statistics
Cache configuration example in application.yml:
spring:
cache:
type: redis
redis:
time-to-live: 3600000
cache-null-values: false
redis:
host: localhost
port: 6379
The project follows TDD practices:
# Run unit tests
./mvnw test
# Run integration tests
./mvnw verify -P integration-test
Once the application is running, you can access:
- Swagger UI:
http://localhost:8080/swagger-ui.html