{"id":15142634,"url":"https://github.com/itsronalds/coworkreserveapi","last_synced_at":"2026-02-26T08:35:15.726Z","repository":{"id":256434548,"uuid":"855236064","full_name":"itsronalds/CoworkReserveAPI","owner":"itsronalds","description":"API for a reservation system built with FastAPI","archived":false,"fork":false,"pushed_at":"2024-09-13T22:10:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T21:49:26.154Z","etag":null,"topics":["fastapi","mysql","orm","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsronalds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-10T14:45:27.000Z","updated_at":"2024-09-13T22:10:26.000Z","dependencies_parsed_at":"2024-11-01T13:00:31.546Z","dependency_job_id":"7caca28e-9cd2-4b9f-83c7-fe7eb2638a46","html_url":"https://github.com/itsronalds/CoworkReserveAPI","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"7e7083b0458294c1a106896a2c92968611256a1a"},"previous_names":["itsronalds/coworkreserveapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsronalds%2FCoworkReserveAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsronalds%2FCoworkReserveAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsronalds%2FCoworkReserveAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsronalds%2FCoworkReserveAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsronalds","download_url":"https://codeload.github.com/itsronalds/CoworkReserveAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509164,"owners_count":20950233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","mysql","orm","sqlalchemy"],"created_at":"2024-09-26T09:43:12.325Z","updated_at":"2026-02-26T08:35:15.659Z","avatar_url":"https://github.com/itsronalds.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoworkReserveAPI\n\nCoworkReserveAPI is a RESTful API built with **FastAPI** to manage a coworking space reservation system. It provides administration for coworking spaces, users, and reservations, integrating JWT authentication, role-based access control, and secure CRUD operations with a MySQL database.\n\n## Table of Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [API Documentation](#api-documentation)\n- [Endpoints Structure](#endpoints-structure)\n\n---\n\n## Features\n\n- CRUD for coworking spaces (admin only)\n- CRUD for reservations (admin only)\n- JWT-based authentication and authorization\n- MySQL database backend\n- Interactive documentation with OpenAPI/Swagger\n- Modular structure by routes and schemas\n\n## Requirements\n\n- Python v3.9 or later\n- MySQL database\n\n## Installation\n\n1. **Clone this repository:**\n\n    ```bash\n    git clone https://github.com/itsronalds/CoworkReserveAPI.git\n    cd CoworkReserveAPI\n    ```\n\n2. **Install the database:**\n\n    In the `database` folder, you will find the file `cowork_db.sql`. Import it into your MySQL server to initialize the database structure.\n\n3. **Create and activate a virtual environment (Windows):**\n\n    ```bash\n    python -m venv venv\n    venv\\Scripts\\Activate\n    ```\n\n4. **Install dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n## Configuration\n\n1. Create a `.env` file at the root of the project with the following content:\n\n    ```env\n    DATABASE_URI='mysql+pymysql://\u003cuser\u003e:\u003cpassword\u003e@localhost:3306/cowork_db'\n    TOKEN_SECRET='a_secret'\n    ```\n\n    Replace `\u003cuser\u003e` and `\u003cpassword\u003e` with your MySQL credentials.\n\n## Usage\n\nTo run the project:\n\n```bash\npy main.py\n```\n\nBy default, the server will run at `http://localhost:8000`.\n\n## API Documentation\n\nYou can access the interactive documentation and test the endpoints at:\n\n- [http://localhost:8000/docs](http://localhost:8000/docs)\n\nIf you run the project on a different port, update the URL accordingly.\n\n## Endpoints Structure\n\nSome main endpoints:\n\n- `POST /auth/login` — User authentication\n- `GET /coworking/` — List coworking spaces (admin only)\n- `POST /coworking/` — Create a coworking space (admin only)\n- `PUT /coworking/{id}` — Update a coworking space (admin only)\n- `DELETE /coworking/{id}` — Delete a coworking space (admin only)\n- `GET /reservations/` — List reservations (admin only)\n- `POST /reservations/` — Create a reservation (admin only)\n- `DELETE /reservations/{id}` — Delete a reservation (admin only)\n\n\u003e **Note:** All operations require JWT authentication. Only users with the `admin` role can access most endpoints.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsronalds%2Fcoworkreserveapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsronalds%2Fcoworkreserveapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsronalds%2Fcoworkreserveapi/lists"}