{"id":26985746,"url":"https://github.com/codelur/se_project_express","last_synced_at":"2025-07-14T05:34:04.081Z","repository":{"id":284476263,"uuid":"915478073","full_name":"codelur/se_project_express","owner":"codelur","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T04:12:57.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T05:19:53.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codelur.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":"2025-01-12T00:04:17.000Z","updated_at":"2025-03-26T04:13:00.000Z","dependencies_parsed_at":"2025-03-26T05:30:00.031Z","dependency_job_id":null,"html_url":"https://github.com/codelur/se_project_express","commit_stats":null,"previous_names":["codelur/se_project_express"],"tags_count":0,"template":false,"template_full_name":"tripleten-com/se_project_express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelur%2Fse_project_express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelur%2Fse_project_express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelur%2Fse_project_express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelur%2Fse_project_express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelur","download_url":"https://codeload.github.com/codelur/se_project_express/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247057092,"owners_count":20876511,"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":[],"created_at":"2025-04-03T18:34:04.359Z","updated_at":"2025-07-14T05:34:04.066Z","avatar_url":"https://github.com/codelur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WTWR Server\n\nThis project implements the back end for the WTWR (What To Wear?) application. It features a **Node.js** and **Express.js** server, utilizing **MongoDB** to store user and clothing item data. The objective is to develop a secure and efficient server with an API and user authentication.\n\n## Live Demo\nThe project is hosted at: https://www.codelurwtwr.jumpingcrab.com/\n\n[Visit the website](https://www.codelurwtwr.jumpingcrab.com/)\n\n### Backend repository:\n[URL](https://api.codelurwtwr.jumpingcrab.com)\n[Repository](https://github.com/codelur/se_project_express)\n\n## Features\n\n- **User Management:**\n\n  - Each user has a name, avatar, email, and password.\n  - Users can like items belonging to other users.\n\n- **Clothing Items:**\n\n  - Each clothing item has the following attributes:\n    - Name\n    - Weather conditions suitable for the item\n    - Image URL\n    - Owner (linked to a user)\n    - Likes (users who liked the item)\n    - Date created\n\n- **Error Handling:**\n\n  - Handles the following HTTP error codes on the app:\n    - **400**: Bad Request (e.g., validation errors)\n    - **401**: Unauthorized (e.g., invalid token)\n    - **403**: Forbidden (e.g., insufficient permissions)\n    - **404**: Resource Not Found\n    - **409**: Conflict (e.g., duplicate resources or MongoDB error code 11000)\n    - **500**: Internal Server Error\n  - Provides appropriate error messages for client requests.\n\n- **Success Responses:**\n\n  - **200**: Successful requests.\n  - **201**: Resource successfully created.\n\n- **Authentication \u0026 Authorization:**\n\n  - Middleware is implemented to handle user authorization and authentication using **JWT tokens**.\n  - Protects existing routes to ensure only authenticated users can access, update, or delete resources.\n\n- **User Registration and Authentication:**\n\n  - Routes and controllers added for user signup and signin.\n\n- **User Data Modification:**\n\n  - Routes and controllers added for modifying the current user's data (e.g., name, avatar).\n\n## Technologies Used\n\n- **Node.js**: A JavaScript runtime for building server-side applications.\n- **Express.js**: A web application framework for Node.js.\n- **MongoDB**: A NoSQL database for storing user and clothing item data.\n- **Mongoose**: An ODM (Object Data Modeling) library for MongoDB.\n- **JWT**: JSON Web Tokens for secure user authentication and authorization.\n\n## Project Structure\n\nThe project is organized into routes, controllers, and models:\n\n1. **Routes**:\n   - Handles API endpoints for users and clothing items.\n   - Includes endpoints for signing up, signing in, and modifying user data.\n2. **Controllers**:\n   - Contains the business logic for handling requests and responses.\n3. **Models**:\n   - Defines the structure of the database collections (e.g., users, clothing items).\n\n## How to Run\n\n1. Clone this repository:\n\n   git clone https://github.com/codelur/se_project_express.git\n\n2. Set up environment variables:\n\nCreate a .env file and include the following variables:\n\nMONGO_URI=\u003cyour-mongodb-uri\u003e\nJWT_SECRET=\u003cyour-secret-key\u003e\n\n## Future Goals\n\nExtend the API to include additional features.\nExtend the server to include more robust user profile customization.\nEnhance error handling and logging mechanisms.\n\n## Contributions\n\nFeel free to open issues and submit pull requests. All contributions are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelur%2Fse_project_express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelur%2Fse_project_express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelur%2Fse_project_express/lists"}