{"id":25122483,"url":"https://github.com/riz4d/eventgate-backend","last_synced_at":"2025-04-02T16:28:43.477Z","repository":{"id":257906706,"uuid":"873142495","full_name":"riz4d/EventGate-Backend","owner":"riz4d","description":"This project is the backend for EventGate, a Flask-based web application for generating and managing virtual event tickets. It uses Firebase for database storage and Pyrebase for Firebase integration. The application also supports CORS and sends confirmation emails to attendees.","archived":false,"fork":false,"pushed_at":"2024-10-15T17:22:22.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T02:04:32.113Z","etag":null,"topics":["eventgate","hacktoberfest-accepted","opt-in-to-hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/riz4d.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-15T17:08:17.000Z","updated_at":"2024-10-15T17:22:25.000Z","dependencies_parsed_at":"2024-10-17T00:24:57.236Z","dependency_job_id":null,"html_url":"https://github.com/riz4d/EventGate-Backend","commit_stats":null,"previous_names":["riz4d/eventgate-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FEventGate-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FEventGate-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FEventGate-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riz4d%2FEventGate-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riz4d","download_url":"https://codeload.github.com/riz4d/EventGate-Backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246850201,"owners_count":20844020,"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":["eventgate","hacktoberfest-accepted","opt-in-to-hacktoberfest"],"created_at":"2025-02-08T07:13:51.501Z","updated_at":"2025-04-02T16:28:43.455Z","avatar_url":"https://github.com/riz4d.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EventGate Backend\n\nThis project is the backend for EventGate, a Flask-based web application for generating and managing virtual event tickets. It uses Firebase for database storage and Pyrebase for Firebase integration. The application also supports CORS and sends confirmation emails to attendees.\n\n### Project Structure\n\n```\nEventGate-Backend/\n├── app.py\n├── config.py\n├── gen_uuid.py\n├── mail.py\n├── requirements.txt\n├── test.py\n└── vercel.json\n```\n### Files\n\n- **[app.py](app.py)**: Main application file that sets up Flask routes and handles ticket creation and retrieval.\n- **[config.py](config.py)**: Configuration file for Firebase and other settings.\n- **[gen_uuid.py](gen_uuid.py)**: Contains the `generate_unique_id` function to generate unique user IDs.\n- **[mail.py](mail.py)**: Handles sending emails to attendees.\n- **[requirements.txt](requirements.txt)**: Lists the Python dependencies for the project.\n- **[test.py](test.py)**: Contains test functions and utilities.\n- **[vercel.json](vercel.json)**: Configuration file for deploying the application on Vercel.\n\n## Setup\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/riz4d/EventGate-Backend/tree/main\n    cd EventGate-Backend\n    ```\n\n2. Install dependencies:\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n3. Configure Firebase:\n    - Update `firebase_config` in `config.py` with your Firebase project details.\n\n4. Run the application:\n    ```sh\n    python app.py\n    ```\n\n## API Endpoints\n\n### Create Ticket\n\n- **URL**: `/api/ticket`\n- **Method**: `POST`\n- **Description**: Creates a new ticket for an attendee.\n- **Request Body**:\n    ```json\n    {\n        \"fullname\": \"John Doe\",\n        \"email\": \"john.doe@example.com\"\n    }\n    ```\n- **Response**:\n    ```json\n    {\n        \"status\": true,\n        \"message\": \"Ticket created\",\n        \"data\": {\n            \"fullname\": \"John Doe\",\n            \"email\": \"john.doe@example.com\",\n            \"userId\": \"12345678\",\n            \"attendeeType\": \"participant\",\n            \"present\": false\n        },\n        \"id\": \"12345678\"\n    }\n    ```\n\n### Get All Ticket IDs\n\n- **URL**: `/api/ticket`\n- **Method**: `GET`\n- **Description**: Retrieves all ticket IDs.\n\n## Functions\n\n### `generate_unique_id`\n\n- **File**: [gen_uuid.py](gen_uuid.py)\n- **Description**: Generates a unique user ID.\n- **Usage**:\n    ```python\n    from gen_uuid import generate_unique_id\n    new_id = generate_unique_id()\n    ```\n\n### `send_email`\n\n- **File**: [mail.py](mail.py)\n- **Description**: Sends an email to the attendee.\n- **Usage**:\n    ```python\n    from mail import send_email\n    status_code, response = send_email(attendee_email, subject, text_content, attendee_name, attendee_email, user_id, ticket_type, qr_code_url)\n    ```\n## Contributing\n\nWe welcome contributions to improve EventGate-Backend! To contribute, follow these steps:\n\n1. Fork the repository.\n2. Create a new branch:\n    ```sh\n    git checkout -b feature-branch\n    ```\n3. Make your changes and commit them:\n    ```sh\n    git commit -m \"Description of your changes\"\n    ```\n4. Push to the branch:\n    ```sh\n    git push origin feature-branch\n    ```\n5. Open a pull request describing your changes.\n\nPlease ensure your code adheres to the existing style and includes appropriate tests.\n\n## Issues\n\nIf you encounter any issues or have suggestions for improvements, please open an issue on the [GitHub Issues](https://github.com/riz4d/EventGate-Backend/issues) page.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friz4d%2Feventgate-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friz4d%2Feventgate-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friz4d%2Feventgate-backend/lists"}