This is a FastAPI-based backend service for managing Art Corporation's computer graphics projects and software versions.
- CRUD operations for projects and software versions
- Paginated project listing with search functionality
- Software version association with projects
- Validation to prevent:
- Multiple major versions of the same software in a project
- Use of deprecated software versions
POST /projects/- Create a new projectGET /projects/- List projects (with pagination and search)GET /projects/{project_id}- Get project detailsPUT /projects/{project_id}- Update a projectDELETE /projects/{project_id}- Delete a project
POST /software/- Create a new software versionGET /software/- List software versions
POST /projects/{project_id}/software/{software_id}- Associate software with a project
-
Build the Docker image:
docker build -t art-corp-manager . -
Run the container:
docker run -p 8000:8000 -v $(pwd)/exercise.db:/app/exercise.db art-corp-manager
curl -X POST http://localhost:8000/projects/ \
-H "Content-Type: application/json" \
-d '{"name": "Project Alpha", "description": "New animation project"}' | jqcurl http://localhost:8000/projects/?skip=0&limit=10&search=alpha | jqcurl -X POST http://localhost:8000/software-versions/ \
-H "Content-Type: application/json" \
-d '{"name": "Maya", "version": "2024", "is_deprecated": false}' | jqcurl -X POST http://localhost:8000/projects/1/software/1 | jqThe API provides detailed error messages for common scenarios:
- 404: Resource not found
- 400: Bad request (validation errors, conflicts)
- 500: Server errors
Each error response includes a descriptive message to help identify the issue.