{"id":19676037,"url":"https://github.com/wannacry081/makersync-django","last_synced_at":"2025-10-05T16:55:24.490Z","repository":{"id":231363426,"uuid":"781446607","full_name":"WannaCry081/MakerSync-Django","owner":"WannaCry081","description":" The MakerSync API connects our Flutter mobile app with the machinery for converting PETG plastic into 3D printing filament. It has two versions: v1 links with Firebase Firestore via firebase_admin in Python, while v2 uses SQLite.","archived":false,"fork":false,"pushed_at":"2024-05-20T02:14:49.000Z","size":272,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T21:05:03.578Z","etag":null,"topics":["django","django-ninja","django-ninja-extra","firebase","rest-api","sqlite"],"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/WannaCry081.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-04-03T11:57:54.000Z","updated_at":"2024-11-30T05:03:31.000Z","dependencies_parsed_at":"2024-04-14T07:32:18.465Z","dependency_job_id":"bae57fda-d788-4e17-9771-25f611166bc5","html_url":"https://github.com/WannaCry081/MakerSync-Django","commit_stats":null,"previous_names":["wannacry081/makersync-django"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/WannaCry081/MakerSync-Django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FMakerSync-Django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FMakerSync-Django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FMakerSync-Django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FMakerSync-Django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WannaCry081","download_url":"https://codeload.github.com/WannaCry081/MakerSync-Django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FMakerSync-Django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486278,"owners_count":25994941,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["django","django-ninja","django-ninja-extra","firebase","rest-api","sqlite"],"created_at":"2024-11-11T17:26:53.958Z","updated_at":"2025-10-05T16:55:24.471Z","avatar_url":"https://github.com/WannaCry081.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MakerSync [Django]\n\nMakerSync API facilitates the interaction between our Flutter mobile app and the circuitry involved in the process of converting PETG plastic into 3D printing filament. It offers two versions: v1, which integrates with Firebase Firestore using firebase_admin in Python, and v2, which utilizes PosgreSQL.\n\n\u003e [!NOTE]\n\u003e\n\u003e When running this project locally, it utilizes SQLite as the default database engine.\n\n## Tools Used\n\n- [Django](https://www.djangoproject.com/)\n- [Django Ninja](https://django-ninja.dev/)\n- [Django Ninja-Extra](https://eadwincode.github.io/django-ninja-extra/)\n- [Firebase Admin](https://github.com/firebase/firebase-admin-python)\n- [Vercel (Deployment)](https://vercel.com/)\n\n## Endpoints\n\nYou can access the MakerSync API endpoints through the provided documentation. Simply browse to [MakerSync v1 API Documentation](http://127.0.0.1:8000/api/v1/docs) or [MakerSync v2 API Documentation](http://127.0.0.1:8000/api/v2/docs) in your local hosts to get an overview of available endpoints and interact with the API.\n\n\n### v1 Endpoints\n\nMakerSync v1 utilizes Firebase as its primary database system, offering real-time updates and changes through the Firebase console website.\n\n#### Users\n\n- **GET** `/api/v1/machines/{machine_code}/users/`: Retrieve all users within the machine identified by a unique sensor ID.\n- **POST** `/api/v1/machines/{machine_code}/users/`: Add a user to a specific machine identified by its sensor ID.\n- **GET** `/api/v1/machines/{machine_code}/users/{email}`: Retrieve user information based on email within a specific machine.\n- **PUT** `/api/v1/machines/{machine_code}/users/{email}`: Update user information within a specific machine based on email.\n- **DELETE** `/api/v1/machines/{machine_code}/users/{email}`: Delete a specific user from the machine based on email.\n\n#### Machine\n\n- **GET** `/api/v1/machines/{machine_code}/sensors`: Retrieve sensor information for a specific machine based on its sensor ID.\n- **POST** `/api/v1/machines`: Add a new machine to the database identified by its sensor ID.\n- **PUT** `/api/v1/machines/{machine_code}/sensors`: Update all information related to a specific machine based on its sensor ID.\n- **DELETE** `/api/v1/machines/{machine_code}/sensors`: Delete a machine from the database based on its sensor ID.\n\n\n### v2 Endpoints\n\nMakerSync v2 utilizes PostgreSQL as its primary database system, offering unlimited user request and response capabilities.\n\n#### Machine\n\n- **POST** `/api/v2/machines`: Create a new machine entry in the database with a unique machine code.\n\n#### Sensor\n\n- **GET** `/api/v2/machines/{machine_code}/sensors`: Retrieve all sensors associated with a specific machine identified by its machine code.\n- **POST** `/api/v2/machines/{machine_code}/sensors`: Add a new sensor to a specific machine identified by its machine code.\n- **PUT** `/api/v2/machines/{machine_code}/sensors`: Update sensor information within a specific machine based on its machine code.\n- **DELETE** `/api/v2/machines/{machine_code}/sensors`: Delete a specific sensor from the machine based on its machine code.\n\n#### Notification\n\n- **GET** `/api/v2/machines/{machine_code}/notifications`: Retrieve all notifications associated with a specific machine identified by its machine code.\n- **GET** `/api/v2/machines/{machine_code}/notifications/{notification_id}`: Retrieve a specific notification by its ID within a machine identified by its machine code.\n- **POST** `/api/v2/machines/{machine_code}/notifications`: Create a new notification associated with a specific machine identified by its machine code.\n\n#### User\n\n- **GET** `/api/v2/machines/{machine_code}/users`: Retrieve all users associated with a specific machine identified by its machine code.\n- **GET** `/api/v2/machines/{machine_code}/users/{email}`: Retrieve user information based on email within a specific machine identified by its machine code.\n- **POST** `/api/v2/machines/{machine_code}/users`: Add a new user to a specific machine identified by its machine code.\n- **PUT** `/api/v2/machines/{machine_code}/users/{email}`: Update user information within a specific machine based on email and machine code.\n- **DELETE** `/api/v2/machines/{machine_code}/users/{email}`: Delete a specific user from the machine based on email and machine code.\n\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/WannaCry081/MakerSync-Django.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd makersync-django\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Migrate database:\n   ```bash\n   python manage.py makemigrations v2\n   python manage.py migrate\n\n   # View changes using the admin page\n   python manage.py createsuperuser \n   ```\n\n5. Run the Django development server:\n   ```bash\n   python manage.py runserver\n   ```\n\n6. Access the API documentation locally at [MakerSync v1 API Documentation](http://127.0.0.1:8000/api/v1/docs) or [MakerSync v2.0 API Documentation](http://127.0.0.1:8000/api/v2/docs). \n\n\n### Additional Option\n\nAlternatively, you can use the provided `run.sh` script to automate the setup process:\n\n```bash\n# In Windows\n\u003e run.sh [venv | pipenv]\n\n# In Linux\n$ chmod +x run.sh\n$ ./run.sh\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e This script will automatically create a virtual environment, install the necessary dependencies, and run the Django API for you.\n\n## Usage\n\nOnce the server is running, you can interact with the API using tools like cURL, Postman, or directly from your Flutter mobile app. Refer to the provided API documentation for detailed information on available endpoints and their usage.\n\n## Contribution\n\nContributions to MakerSync-Django are welcome! If you have any ideas, suggestions, or improvements, feel free to open an issue or submit a pull request on the GitHub repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannacry081%2Fmakersync-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwannacry081%2Fmakersync-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannacry081%2Fmakersync-django/lists"}