{"id":19836194,"url":"https://github.com/opifexm/sixcitiesserver","last_synced_at":"2026-04-07T18:31:50.969Z","repository":{"id":229036391,"uuid":"775593888","full_name":"opifexM/SixCitiesServer","owner":"opifexM","description":"The Six Cities Server is a Node.js-based platform offering affordable travel accommodations via REST API and CLI. It features user authentication, dynamic listings, comments, and favorites, utilizing MongoDB for data management.","archived":false,"fork":false,"pushed_at":"2024-04-01T00:57:38.000Z","size":35151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T22:01:56.840Z","etag":null,"topics":["cli","docker","expressjs","mongodb","nodejs","openapi","rest-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/opifexM.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":"2024-03-21T17:15:35.000Z","updated_at":"2024-03-21T17:18:00.000Z","dependencies_parsed_at":"2025-01-11T10:48:20.120Z","dependency_job_id":"f1be0760-39d5-4c36-9383-d8bb8450427f","html_url":"https://github.com/opifexM/SixCitiesServer","commit_stats":null,"previous_names":["opifexm/sixcitiesserver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opifexM/SixCitiesServer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opifexM%2FSixCitiesServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opifexM%2FSixCitiesServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opifexM%2FSixCitiesServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opifexM%2FSixCitiesServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opifexM","download_url":"https://codeload.github.com/opifexM/SixCitiesServer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opifexM%2FSixCitiesServer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31524524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cli","docker","expressjs","mongodb","nodejs","openapi","rest-api","typescript"],"created_at":"2024-11-12T12:10:25.894Z","updated_at":"2026-04-07T18:31:50.872Z","avatar_url":"https://github.com/opifexM.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Node CI](https://github.com/opifexM/SixCitiesServer/actions/workflows/nodejs.yml/badge.svg)](https://github.com/opifexM/SixCitiesServer/actions/workflows/nodejs.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/ff4d28b6d81b95e29c6d/maintainability)](https://codeclimate.com/github/opifexM/SixCitiesServer/maintainability)\n\n# Six Cities Server\n\nThe Six Cities Server is a Node.js-based platform offering affordable travel accommodations via REST API and CLI. It features user authentication, dynamic listings, comments, and favorites, utilizing MongoDB for data management. Designed for efficiency and ease of use, it caters to travelers seeking cost-effective stays.\n\n## Description\n\nThe Six Cities Server project encompasses a comprehensive travel accommodation service platform, engineered to assist travelers in finding cost-effective rental options across six of the most sought-after urban destinations. At its core, the service facilitates the creation, editing, and deletion of rental offers, along with the ability to view detailed information about each listing, including premium options and favorites. Users can interact with the platform through both REST API and CLI interfaces, ensuring versatility and ease of use. Additionally, the project integrates a user authentication system, supporting registration, login, and logout functionalities, and features a dynamic comment system for community engagement. Premium listings and a favorites system enhance user experience by highlighting select offers and personalizing the search process. The backend is developed using Node.js and Express.js, with MongoDB serving as the database solution. The project also includes optional frontend integration, expanding its utility and user interface capabilities. Designed with scalability and user-friendliness in mind, the Six Cities Server aims to redefine how travelers approach accommodation booking, merging convenience with affordability.\n\n## Features\n- **New Offer Creation**: Users can create new rental offers.\n- **Offer Management**: Users can edit or delete their offers.\n- **Rental Listings**: Provides a list of rental offers available in selected cities.\n- **Detailed Offer** Information: Access detailed information about each offer, including premium and favorite status.\n- **Comment System**: Users can add comments to offers and view lists of comments.\n- **User Authentication**: Supports user registration, login, and logout functionalities.\n- **Premium Offers**: Displays premium offers for each city.\n- **Favorites**: Allows users to add or remove offers from their favorites.\n\n## Technologies\n- **REST API and CLI Interfaces**: Offers both REST API and CLI interfaces for interacting with the service.\n- **Frontend Integration**: Optional task to integrate backend services with a frontend application.\n- **Node.js**: For server-side logic.\n- **Express.js**: To handle HTTP requests.\n- **MongoDB**: For database management.\n- **Docker**: For easy deployment and environment setup.\n- **TypeScript**: For type-safe code development.\n\n## File Structure\n- **src/**: Source code directory.\n  - **api/**: Contains the REST API implementation.\n  - **cli/**: Contains the CLI implementation.\n  - **models/**: Data models and database schema definitions.\n  - **services/**: Business logic and service layer.\n- **specification/**: OpenAPI specification for the REST API.\n- **.env.example**: An example environment configuration file.\n- **docker-compose.yml**: Docker Compose file for setting up MongoDB.\n\n## Installation\nEnsure you have Node.js, Docker, and MongoDB installed on your machine. Clone the repository and set up the environment:\n\n```bash\ngit clone https://github.com/user/six-cities.git\ncd six-cities\ncp .env-example .env\n# Modify .env with your settings\nnpm install\n```\n\n### Running Containers\nTo start the container setup for the Six Cities project, use the following command:\n\n```bash\ndocker compose --file ./docker-compose.yml --env-file ./.env --project-name \"six-cities\" up -d\n```\n\nTo stop and remove the containers, execute:\n```bash\ndocker compose --file ./docker-compose.yml --env-file ./.env --project-name \"six-cities\" down\n```\n\nTo import data from a TSV file:\n\n```bash\nnpm run ts -- ./src/main.cli.ts --import mocks/mock-data.tsv\n```\n\nTo import data from multiple TSV files:\n```bash\nnpm run ts -- ./src/main.cli.ts --import data1.tsv data2.tsv data3.tsv\n```\n\nTo import data from a TSV file with database connection details:\n- -db-user [database_login]\n- -db-password [database_password]\n- -db-host [database_server]\n- -db-port [database_port]\n- -db-name [database_name]\n```bash\nnpm run ts -- ./src/main.cli.ts --import mocks/mock-data.tsv -u [user] -p [password] -h [host] -P [port] -n [dbname]\n```\n\nGenerating mock data and saving it to a TSV file:\n```bash\nnpm run ts -- ./src/main.cli.ts --generate 100 ./mocks/mock-offers.tsv http://localhost:3123/api\n```\n\nStarting a mock server:\n```bash\nnpm run json-server ./mocks/mock-server-data.json --port 3123\n```\n\n## License\n\nSix Cities Server is licensed under the MIT license, making it freely available for personal and commercial use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopifexm%2Fsixcitiesserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopifexm%2Fsixcitiesserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopifexm%2Fsixcitiesserver/lists"}