{"id":24711496,"url":"https://github.com/romabulani/learnbot-backend","last_synced_at":"2026-04-16T08:32:56.430Z","repository":{"id":273247401,"uuid":"919097760","full_name":"romabulani/learnbot-backend","owner":"romabulani","description":"Backend for JS AI Teacher","archived":false,"fork":false,"pushed_at":"2025-01-20T04:00:51.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T07:15:00.025Z","etag":null,"topics":["fastapi","genai","google-generative-ai","mongidb","python3"],"latest_commit_sha":null,"homepage":"https://learnbot-backend.onrender.com/","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/romabulani.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-19T17:44:48.000Z","updated_at":"2025-01-20T04:00:52.000Z","dependencies_parsed_at":"2025-01-19T19:34:53.817Z","dependency_job_id":null,"html_url":"https://github.com/romabulani/learnbot-backend","commit_stats":null,"previous_names":["romabulani/learnbot-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romabulani%2Flearnbot-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romabulani%2Flearnbot-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romabulani%2Flearnbot-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romabulani%2Flearnbot-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romabulani","download_url":"https://codeload.github.com/romabulani/learnbot-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918589,"owners_count":20531686,"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","genai","google-generative-ai","mongidb","python3"],"created_at":"2025-01-27T07:15:03.079Z","updated_at":"2025-10-25T22:33:08.444Z","avatar_url":"https://github.com/romabulani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript AI Teacher - Backend\n\n## Overview\n\nThis backend serves as the API for the LearnBot application. It allows users to interact with an AI teacher that is an expert in JavaScript. The backend is responsible for handling user authentication, storing chat sessions, managing context, and interfacing with an AI model (Google GenAI) to generate responses for the user.\n\nThis backend uses **FastAPI** for the web framework, **WebSocket** for real-time communication, and **MongoDB** for data storage.\n\n---\n\n## Features\n\n- **User Authentication** (Sign-up \u0026 Login)\n- **Real-Time Chat** using WebSocket\n- **Session Management** (Keep track of each user’s session)\n- **Message History** (Save and retrieve past messages and sessions)\n- **Contextual Memory** (Remembers past conversations for more relevant responses)\n- **Google GenAI Integration** (Used for generating AI responses)\n- **Database** (MongoDB to store user data, messages, and sessions)\n\n---\n\n## API Endpoints\n\n- **POST /signup**  \n- **POST /login**  \n- **GET /sessions**\n- **POST /sessions**\n- **GET /messages**\n\n---\n\n## WebSocket Endpoint\nThe WebSocket connection allows real-time communication between the user and the JavaScript AI teacher. It maintains context during the conversation.\n\n---\n\n## Database\nThis backend uses MongoDB to store the following:\n\n- User data: Username, hashed password.\n- Session data: User's chat sessions.\n- Messages: Messages exchanged between the user and the AI.\n\n--- \n### Installation and Setup\n\n- Clone the repository\n    ```\n    git clone https://github.com/romabulani/learnbot-backend\n    cd learnbot-backend\n    ```\n- Create a virtual environment:\n    ```\n    python3 -m venv venv\n    source venv/bin/activate  # For Linux/Mac\n    venv\\Scripts\\activate     # For Windows\n    ```\n- Install dependencies:\n    ```\n    pip install -r requirements.txt\n    ```\n- Configure MongoDB:\n\n    Set up a MongoDB instance (locally or use a cloud provider like MongoDB Atlas).\n    Update the connection string and other creds in the .env file.\n- Start the FastAPI app:\n    ```\n    uvicorn main:app --reload\n    ```\n\n---\n## Deployment\n\nThis backend is deployed on the Render.com Free Tier, which may sometimes experience downtime due to traffic limitations. Please note that during peak periods or when free-tier resource limits are reached, the service may be temporarily unavailable.\n\nYou can view the live deployment [here](https://learnbot-backend.onrender.com/)\n\n---\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromabulani%2Flearnbot-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromabulani%2Flearnbot-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromabulani%2Flearnbot-backend/lists"}