Skip to content

soenug/art-corp-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Art Corporation Project Manager

This is a FastAPI-based backend service for managing Art Corporation's computer graphics projects and software versions.

Features

  • 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

API Endpoints

Projects

  • POST /projects/ - Create a new project
  • GET /projects/ - List projects (with pagination and search)
  • GET /projects/{project_id} - Get project details
  • PUT /projects/{project_id} - Update a project
  • DELETE /projects/{project_id} - Delete a project

Software Versions

  • POST /software/ - Create a new software version
  • GET /software/ - List software versions

Associations

  • POST /projects/{project_id}/software/{software_id} - Associate software with a project

Running with Docker

  1. Build the Docker image:

    docker build -t art-corp-manager .
  2. Run the container:

    docker run -p 8000:8000 -v $(pwd)/exercise.db:/app/exercise.db art-corp-manager

API Usage Examples

Create a Project

curl -X POST http://localhost:8000/projects/ \
  -H "Content-Type: application/json" \
  -d '{"name": "Project Alpha", "description": "New animation project"}' | jq

List Projects

curl http://localhost:8000/projects/?skip=0&limit=10&search=alpha | jq

Create Software Version

curl -X POST http://localhost:8000/software-versions/ \
  -H "Content-Type: application/json" \
  -d '{"name": "Maya", "version": "2024", "is_deprecated": false}' | jq

Associate Software with Project

curl -X POST http://localhost:8000/projects/1/software/1 | jq

Error Handling

The 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.

About

Testing project for Art-Corp-Manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages