{"id":19248790,"url":"https://github.com/kevinkoech357/spitfire-events-backend","last_synced_at":"2026-04-21T10:02:13.926Z","repository":{"id":205749463,"uuid":"694575542","full_name":"kevinkoech357/spitfire-events-backend","owner":"kevinkoech357","description":"A REST API built using flask for serving dynamic content for an android-based events app.","archived":false,"fork":false,"pushed_at":"2024-04-22T16:39:12.000Z","size":735,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-05T05:41:40.915Z","etag":null,"topics":["flask","mysql-database","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinkoech357.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-09-21T09:18:52.000Z","updated_at":"2024-04-22T16:39:09.000Z","dependencies_parsed_at":"2023-11-06T10:26:40.084Z","dependency_job_id":"37dd3623-883d-4694-8e33-e4c8ae9a0178","html_url":"https://github.com/kevinkoech357/spitfire-events-backend","commit_stats":null,"previous_names":["kevinkoech357/spitfire-events-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fspitfire-events-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fspitfire-events-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fspitfire-events-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fspitfire-events-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinkoech357","download_url":"https://codeload.github.com/kevinkoech357/spitfire-events-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240339582,"owners_count":19785957,"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":["flask","mysql-database","sqlalchemy"],"created_at":"2024-11-09T18:10:36.534Z","updated_at":"2026-04-21T10:02:13.831Z","avatar_url":"https://github.com/kevinkoech357.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Events App Team SpitFire\n\n## Table Of Contents\n\n- [Introduction](#introduction)\n- [Base URI / Live Deployment](#base-uri--live-deployment)\n- [Local Server Setup](#local-server-setup)\n  - [Clone The Repository](#clone-the-repository)\n  - [Install Dependencies](#install-dependencies)\n  - [Configure Environment Variables](#configure-environment-variables)\n  - [Run the Server](#run-the-server)\n  - [Run API Tests](#run-api-tests)\n- [Authentication](#authentication)\n- [Endpoints](#endpoints)\n  - [Authentication Endpoint](#authentication-endpoint)\n- [Sample Usage](#sample-usage)\n- [Error Handling](#error-handling)\n- [UML Class Diagram](#uml-class-diagram)\n- [Limitations and Assumptions](#limitations-and-assumptions)\n- [Authors](#authors)\n\n## Introduction\n\nWelcome to the Events App documentation for Team SpitFire! This document\nprovides detailed information on setting up the server locally, API endpoints,\nauthentication, sample usage, error handling, and more.\n\n---\n\n## Base URI / Live Deployment\n\nThe Events App is hosted for live testing at [insert_base_uri_here]. Replace\n`[insert_base_uri_here]` with the actual base URI where the API is deployed.\n\n---\n\n## Local Server Setup\n\n### Clone The Repository\n\nTo get started with the local development environment, clone the repository:\n\n```bash\n$ git clone https://github.com/kevinkoech357/spitfire-events-backend.git\n$ cd spitfire-events-backend\n```\n\n### Install Dependencies\n\nYou can set up the environment using either `venv` or `pipenv`. Here are\ninstructions for both:\n\nUsing `venv`:\n\n```bash\n# create Virtual Environment\n$ python3 -m venv venv\n\n# Activate Virtual Env\n$ source venv/bin/activate\n\n# Install Dependencies\n$ pip install -r requirements.txt\n```\n\nUsing `pipenv`:\n\n```bash\n$ pip install pipenv\n\n# create virtuel environment\n$ pipenv --python 3.10\n\n# Activate virtual env\n$ pipenv shell\n\n# install dependencies in requirements.txt or pipfile\n$ pipenv install\n```\n\n### Configure Environment Variables\n\nMake sure to set the following environment variables:\n\n    SECRET_KEY: [Your Secret Key]\n    SQLALCHEMY_DATABASE_URI: [Your Database URI]\n    OAUTHLIB_INSECURE_TRANSPORT: 1\n    ANDROID_CLIENT_ID: \n    IOS_CLIENT_ID:\n\n### Run the Server\n\n```bash\n$ python3 run.py\n```\n\n### Run API Tests\n\n**Note:** ensure you are connected to the internet before running tests and are\nin `spitfire-events` directory\n\n```bash\n# install test suite and HTTP requests library\n$ pip install requests pytest\n\n# Run the tests in test_crud.py\n$ pytest test_event.py -v\n```\n\n[click for test_event.py file](test_event.py)\n\n\u003cbr\u003e\n\n---\n\n## **Authentication**\n\nThe authentication mechanism used by this API is Google oAuth2 with session\ncookies see [Authentication here](./API_DOCUMENTATION.md)\n\n## **EndPoints**\n\nsee [Api Documentation here](./API_DOCUMENTATION.md)\n\n### Authentication Endpoint\n\n`POST 'API/auth'`\n\n- Retrieves a person from the database using user id\n- **Request Body**:\n  - **Input**: JSON with auth token.\n  ```\n  {\n    \"token\": \"google id token\",\n  }\n  ```\n- Returns: JSON response with a message and person object containing `id`,\n  `name` and `date created`\n\nExample Response\n\n```json\n{\n  \"message\": \"success\",\n  \"name\": \"user display name\",\n  \"email\": \"user email\",\n  \"avatar\": \"user image url\"\n}\n```\n\n## _status code: 200_ see [Api Documentation here](./API_DOCUMENTATION.md)\n\n## Sample Usage\n\n## **Error Handling**\n\n\u003e Errors are returned as JSON objects in the following format with their error\n\u003e code\n\n```json\n{\n  \"error\": \"error name\",\n  \"message\": \"error description\"\n}\n```\n\n\u003cbr\u003e\n\nThe API will return 5 error types, with diffreent descriptions when requests\nfail;\n\n- 400: Request unprocessable\n- 403: Forbidden\n- 404: resource not found\n- 422: Bad Request\n- 429: Too Many Requests(rate limiting)\n- 500: Internal server error\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinkoech357%2Fspitfire-events-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinkoech357%2Fspitfire-events-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinkoech357%2Fspitfire-events-backend/lists"}