{"id":25197781,"url":"https://github.com/rocristoi/openedu-api","last_synced_at":"2026-04-26T08:35:52.530Z","repository":{"id":274057225,"uuid":"921753182","full_name":"rocristoi/openEdu-api","owner":"rocristoi","description":"Backend server for openEdu, an app to create free digital classbooks","archived":false,"fork":false,"pushed_at":"2025-02-25T06:43:47.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T08:05:47.111Z","etag":null,"topics":["api","backend","education","nodejs"],"latest_commit_sha":null,"homepage":"https://openedu.live","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocristoi.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":"2025-01-24T14:52:03.000Z","updated_at":"2025-02-25T06:43:50.000Z","dependencies_parsed_at":"2025-02-25T07:32:33.942Z","dependency_job_id":null,"html_url":"https://github.com/rocristoi/openEdu-api","commit_stats":null,"previous_names":["rocristoi/openedu-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rocristoi/openEdu-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocristoi%2FopenEdu-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocristoi%2FopenEdu-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocristoi%2FopenEdu-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocristoi%2FopenEdu-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocristoi","download_url":"https://codeload.github.com/rocristoi/openEdu-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocristoi%2FopenEdu-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32290919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","backend","education","nodejs"],"created_at":"2025-02-10T02:19:42.049Z","updated_at":"2026-04-26T08:35:52.504Z","avatar_url":"https://github.com/rocristoi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![logo](https://i.imgur.com/s0BaSi3.png)\n\nWelcome to the backend repository for Openedu, a web application designed to facilitate creating free digital classbooks. The backend API communicates with the PostgreSQL database using the `pg` library, providing a reliable and efficient data management solution.\n\n## Description\n\nThe backend handles various functionalities, including managing user data, authorizing users, and serving API requests that power the frontend application. If you intend to run this application on your own server, you must set up a `.env` file with the necessary environment variables as outlined below.\n\n## Environment Variables\n\nTo configure the backend application, create a `.env` file in the project root with the following variables:\n\n```plaintext\nAPP_PORT=        # Port number on which the app will run\nDB_HOST=         # Host address for the PostgreSQL database\nDB_NAME=         # Database name\nDB_PASS=         # Database password\nDB_PORT=         # Database port\nSMTP_HOST=       # SMTP host for sending emails\nSMTP_PORT=       # SMTP port\nSMTP_USER=       # SMTP user for email sending\nSMTP_PASS=       # SMTP password for email sending\nCORS_URL=        # Allowed CORS origins\nSSL_PRIVKEY=     # Path to SSL private key\nSSL_CERT=        # Path to SSL certificate\nSSL_CERTBUNDLE=  # Path to SSL certificate bundle\n```\n\n## Key Technologies\n\n- **CORS**: Used to manage cross-origin requests, allowing the frontend and backend to communicate seamlessly when hosted on different domains.\n  \n- **SMTP**: Utilized for sending emails to students and teachers, providing them with login credentials. The emails are securely sent using SMTP credentials.\n  \n- **SSL**: Ensures secure data transmission over the network, safeguarding communication between clients and the server with encryption.\n\n## Endpoints\n\nAll endpoints are protected by Firebase authentication to ensure secure data handling and prevent unauthorized access. Each request is authenticated and authorized against Firebase to verify the sender's identity.\n- **GET /**: Redirects the user to this page.\n\n- **GET /userInfo**: Returns data to the frontend to decide which dashboard to display to the user, including necessary user information obtained from the PostgreSQL database.\n\n- **POST /newSchool**: Handles the creation of users and essential data for a new school once the Admin completes the setup form.\n\n- **POST /addGrade**: Adds a grade for a specific student in a specific subject.\n\n- **POST /addAbsence**: Records an absence for a specific student in a specific subject.\n\n- **POST /excuse**: Excuses a recorded absence for a specific student in a specific subject.\n\n- **POST /excusePeriod**: Excuses all recorded absences for a user over a specified period, authorized by the Head Teacher.\n\n## Required Configuration\n\nFor proper backend operation, include a Firebase service account file named `serviceacc.json` in the project root. This configuration is crucial to authenticate users and authorize requests through Firebase.\n## Additional Information\n\n- The backend primarily communicates with the PostgreSQL database using the `pg` library, ensuring efficient data operations.\n- Please ensure the environment variables are set correctly before running the application, as they control critical aspects of its functionality and security.\n\nContributions to improve the backend functionality are welcome under the Apache License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocristoi%2Fopenedu-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocristoi%2Fopenedu-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocristoi%2Fopenedu-api/lists"}