{"id":20084066,"url":"https://github.com/aanand058/fragments","last_synced_at":"2026-04-16T03:33:03.079Z","repository":{"id":241380404,"uuid":"740807537","full_name":"Aanand058/fragments","owner":"Aanand058","description":"A Cloud-Based Solution for Handling Different Types of Fragments","archived":false,"fork":false,"pushed_at":"2025-03-23T14:48:24.000Z","size":1183,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T18:44:41.644Z","etag":null,"topics":["api-server","aws","docker","dynamodb","ec2-instance","javascript","mircoservices","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Aanand058.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,"zenodo":null}},"created_at":"2024-01-09T05:27:29.000Z","updated_at":"2025-03-23T14:48:27.000Z","dependencies_parsed_at":"2024-05-28T03:55:31.749Z","dependency_job_id":"c701a97c-fe7b-4f87-98a9-b5ca9e33638e","html_url":"https://github.com/Aanand058/fragments","commit_stats":null,"previous_names":["aanand058/fragments"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/Aanand058/fragments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aanand058%2Ffragments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aanand058%2Ffragments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aanand058%2Ffragments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aanand058%2Ffragments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aanand058","download_url":"https://codeload.github.com/Aanand058/fragments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aanand058%2Ffragments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["api-server","aws","docker","dynamodb","ec2-instance","javascript","mircoservices","unit-testing"],"created_at":"2024-11-13T15:50:12.593Z","updated_at":"2026-04-16T03:33:03.048Z","avatar_url":"https://github.com/Aanand058.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fragments Microservice Development\nA Cloud-Based Solution for Handling Different Types of Fragments\n\n\n\n\n# **Fragments Microservices**\n\n## **Project Overview**\n\nFragments Microservices is a cloud-native microservice-based application designed to store, retrieve, and manage user-generated content (fragments) such as text, JSON, and binary data (e.g., images). The application is built using **Node.js**, **Express.js**, and deployed on **AWS** services for scalability and security.\n\nThe system allows users to perform basic CRUD operations on their fragments, with authentication and authorization handled via **Amazon Cognito**. Data is stored in **AWS DynamoDB** for metadata and **Amazon S3** for binary content.\n\n## **Live Demo**\n\nWatch the demo video of the Fragments Microservices project on YouTube:\n\n[![Live Demo](https://youtu.be/Rx3c6Q2UXnQ)]\n\n---\n\n## **Features**\n\n- **User Authentication \u0026 Authorization:** Secured with **Amazon Cognito** to ensure only authenticated users can access the API.\n- **Fragment Management:** Users can create, retrieve, update, and delete fragments (text, JSON, or images).\n- **Scalable Data Storage:**\n  - Metadata is stored in **AWS DynamoDB**.\n  - Binary data is stored in **Amazon S3**.\n- **Microservices Architecture:** The application is containerized using **Docker** and follows a microservices architecture for easy scalability.\n- **Logging and Monitoring:** Integrated structured logging using **Pino** for efficient monitoring and error tracking.\n- **Automated Testing:** Comprehensive unit and integration tests using **Jest** and **Supertest**.\n\n---\n\n## **Technologies Used**\n\n- **Backend:** Node.js, Express.js\n- **Authentication:** Amazon Cognito, Passport.js\n- **Database:** Amazon DynamoDB (NoSQL)\n- **Storage:** Amazon S3\n- **CI/CD \u0026 Containers:** Docker, GitHub Actions, Docker Compose, LocalStack\n- **Testing:** Jest, Supertest, Hurl\n- **Logging:** Pino\n- **Cloud Infrastructure:** AWS EC2, AWS Lambda, AWS SDK\n- **Version Control:** Git, GitHub\n\n---\n\n## **Installation Instructions**\n\nTo set up this project locally:\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/Aanand058/fragments.git\n   ```\n\n2. **Install Dependencies:**\n\n   ```bash\n   npm install\n   ```\n\n3. **Set Up Environment Variables:**\n\n   Create a `.env` file in the root directory with the following variables:\n\n   ```bash\n   AWS_ACCESS_KEY_ID=\u003cyour-access-key\u003e\n   AWS_SECRET_ACCESS_KEY=\u003cyour-secret-key\u003e\n   AWS_REGION=\u003cyour-aws-region\u003e\n   S3_BUCKET_NAME=\u003cyour-s3-bucket-name\u003e\n   DYNAMODB_TABLE_NAME=\u003cyour-dynamodb-table-name\u003e\n   COGNITO_POOL_ID=\u003cyour-cognito-user-pool-id\u003e\n   ```\n\n4. **Run the Application:**\n\n   ```bash\n   npm start\n   ```\n\n5. **Run Tests:**\n\n   To run the test suite:\n\n   ```bash\n   npm test\n   ```\n\n---\n\n## **Usage**\n\nOnce the application is up and running, you can access the API endpoints for managing fragments:\n\n- **Create Fragment:**\n  - POST `/v1/fragments`\n- **Get Fragment:**\n  - GET `/v1/fragments/:id`\n- **Update Fragment:**\n  - PUT `/v1/fragments/:id`\n- **Delete Fragment:**\n  - DELETE `/v1/fragments/:id`\n\nRefer to the Postman collection provided for detailed API usage.\n\n---\n\n## **API Documentation**\n\n- **Base URL:** `http://localhost:8080/v1/fragments`\n- **Authentication:** The API uses **Amazon Cognito** tokens for authentication. Include the `Authorization` header with a valid token for each request.\n\n### **Endpoints:**\n\n1. **POST /fragments**\n   - Create a new fragment (text, JSON, or binary data).\n   \n2. **GET /fragments/:id**\n   - Retrieve a specific fragment by its ID.\n\n3. **PUT /fragments/:id**\n   - Update an existing fragment.\n\n4. **DELETE /fragments/:id**\n   - Delete a fragment.\n\n---\n\n## **Testing**\n\nThe project includes unit tests and integration tests to ensure code quality and functionality. You can run tests using:\n\n```bash\nnpm test\n```\n\n---\n\n## **Contact**\n\nFor any inquiries or suggestions, feel free to reach out via:\n\n- **GitHub:** [Aanand058](https://github.com/Aanand058)\n- **Email:** [yamit058@gmail.com](mailto:yamit058@gmail.com)\n\n---\n\nThis documentation is designed to provide an overview of your project, highlight the technologies used, and offer clear instructions on installation, usage, and contributing. Let me know if you need further customization!\n\n## Package.json Scripts\n\n- `npm start`: Start the server.\n- `npm run lint`: Lint code using ESLint on .js files stored under src folder.\n- `npm run dev`: Start the server in development mode with debug logs enabled.\n- `npm run debug`: Start the server in debug mode for remote debugging with a debugger attached.\n- `npm run test:watch`: Runs Jest in watch mode with a specific configuration file.\n- `npm run test`: Runs Jest tests with a specific configuration file.\n- `npm run coverage`: Runs Jest to generate test coverage reports.\n\n## Usage\n\nYou can use tools like Postman or curl to interact with the API endpoints.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faanand058%2Ffragments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faanand058%2Ffragments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faanand058%2Ffragments/lists"}