{"id":21668504,"url":"https://github.com/mauricifj/alura-node-gemini-backend","last_synced_at":"2026-04-13T19:31:59.065Z","repository":{"id":263482456,"uuid":"890546609","full_name":"Mauricifj/alura-node-gemini-backend","owner":"Mauricifj","description":"Backend project to learn Node.js and Gemini with Alura","archived":false,"fork":false,"pushed_at":"2024-11-23T04:01:57.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T07:18:39.941Z","etag":null,"topics":["back-end","backend","gemini","gemini-ai","gemini-api","mongo","mongodb","mongodb-atlas","mongodb-database","node","node-js","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Mauricifj.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-11-18T18:57:34.000Z","updated_at":"2024-11-23T04:02:00.000Z","dependencies_parsed_at":"2024-11-23T05:17:16.103Z","dependency_job_id":null,"html_url":"https://github.com/Mauricifj/alura-node-gemini-backend","commit_stats":null,"previous_names":["mauricifj/alura-node-gemini","mauricifj/alura-node-gemini-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mauricifj/alura-node-gemini-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mauricifj%2Falura-node-gemini-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mauricifj%2Falura-node-gemini-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mauricifj%2Falura-node-gemini-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mauricifj%2Falura-node-gemini-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mauricifj","download_url":"https://codeload.github.com/Mauricifj/alura-node-gemini-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mauricifj%2Falura-node-gemini-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268372010,"owners_count":24239795,"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-08-02T02:00:12.353Z","response_time":74,"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":["back-end","backend","gemini","gemini-ai","gemini-api","mongo","mongodb","mongodb-atlas","mongodb-database","node","node-js","nodejs"],"created_at":"2024-11-25T12:16:09.967Z","updated_at":"2026-04-13T19:31:59.031Z","avatar_url":"https://github.com/Mauricifj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alura Node Gemini\n\nBackend project to learn Node.js and Gemini with Alura.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Endpoints](#api-endpoints)\n- [Environment Variables](#environment-variables)\n- [Project Structure](#project-structure)\n- [License](#license)\n\n## Installation\n\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/Mauricifj/alura-node-gemini-backend\ncd alura-node-gemini-backend\n```\n\n2. Install dependencies:\n\n```sh\nnpm install\n```\n\n3. Create a `.env` file in the root directory and add the following environment variables:\n\n```env\nGEMINI_API_KEY=\"your-gemini-api-key\"\nMONGO_DB_NAME=\"your-mongo-db-name\"\nMONGO_DB_POSTS_COLLECTION=\"your-mongo-db-posts-collection\"\nMONGO_DB_CONNECTION_STRING=\"your-mongo-db-connection-string\"\n```\n\n## Usage\n\n1. Start the server:\n\n```sh\nnpm run dev\n```\n\n2. The server will be running on `http://localhost:3000`.\n\n## API Endpoints\n\n### Get All Posts\n\n- **URL:** `/posts`\n- **Method:** `GET`\n- **Response:**\n\n```json\n[\n    {\n        \"_id\": \"post-id\",\n        \"imageUrl\": \"image-url\",\n        \"description\": \"image-description\",\n        \"alt\": \"image-alt\"\n    },\n    ...\n]\n```\n\n### Create Post\n\n- **URL:** `/posts`\n- **Method:** `POST`\n- **Request Body:**\n\n```json\n{\n    \"imageEncoded\": \"base64-encoded-image\",\n    \"isAIEnabled\": true, // Will replace image description and alt text for AI generated content\n    \"description\": \"image-description\",\n    \"alt\": \"image-alt\"\n}\n```\n\n- **Response:**\n\n```json\n{\n    \"_id\": \"post-id\",\n    \"imageUrl\": \"image-url\",\n    \"description\": \"image-description\",\n    \"alt\": \"image-alt\"\n}\n```\n\n## Environment Variables\n\n- `GEMINI_API_KEY`: Your Gemini API key.\n- `MONGO_DB_NAME`: The name of your MongoDB database.\n- `MONGO_DB_POSTS_COLLECTION`: The name of your MongoDB posts collection.\n- `MONGO_DB_CONNECTION_STRING`: Your MongoDB connection string.\n\n## Project Structure\n\n```plaintext\n.\n├── .env\n├── .gitignore\n├── package.json\n├── server.js\n├── services.sh\n├── src\n│   ├── config\n│   │   └── dbConfig.js\n│   ├── controllers\n│   │   └── postsController.js\n│   ├── models\n│   │   └── postsModel.js\n│   ├── routes\n│   │   └── postsRoutes.js\n│   ├── services\n│   │   └── geminiService.js\n│   └── utils\n│       └── file_helper.js\n└── images\n```\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricifj%2Falura-node-gemini-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricifj%2Falura-node-gemini-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricifj%2Falura-node-gemini-backend/lists"}