{"id":23105560,"url":"https://github.com/danielzlatanov/autoexpo","last_synced_at":"2026-04-12T17:02:22.965Z","repository":{"id":167950351,"uuid":"643570530","full_name":"danielzlatanov/autoexpo","owner":"danielzlatanov","description":"HBS Backend API for dynamic car management","archived":false,"fork":false,"pushed_at":"2023-09-17T16:53:26.000Z","size":1060,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T10:14:31.498Z","etag":null,"topics":["api-routes","car-management","data-models","express-api","expressjs","handlebars","mongodb","multi-page-application","user-authentication"],"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/danielzlatanov.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}},"created_at":"2023-05-21T15:28:11.000Z","updated_at":"2023-11-10T19:55:11.000Z","dependencies_parsed_at":"2023-09-17T17:27:54.384Z","dependency_job_id":null,"html_url":"https://github.com/danielzlatanov/autoexpo","commit_stats":null,"previous_names":["danielzlatanov/expressjs-project","danielzlatanov/autoexpo-expressjs","danielzlatanov/autoexpo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzlatanov%2Fautoexpo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzlatanov%2Fautoexpo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzlatanov%2Fautoexpo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzlatanov%2Fautoexpo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielzlatanov","download_url":"https://codeload.github.com/danielzlatanov/autoexpo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247086852,"owners_count":20881277,"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":["api-routes","car-management","data-models","express-api","expressjs","handlebars","mongodb","multi-page-application","user-authentication"],"created_at":"2024-12-17T00:52:17.287Z","updated_at":"2026-04-12T17:02:17.922Z","avatar_url":"https://github.com/danielzlatanov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoExpo Backend API\n\n🚗 **Welcome to the AutoExpo backend API documentation!**\n\nAutoExpo is a multi-page application (MPA) that serves as both the backend and frontend, providing dynamic HTML pages using Handlebars to showcase a diverse collection of cars and car-related information.\n\n## 📂 Application Structure\n\nAutoExpo is organized into several key components:\n\n- **Config**: Contains configuration files for database (MongoDB) setup, Express.js, and routing.\n- **Controllers**: Houses the controllers responsible for handling different routes and functionalities, including authentication, car management, catalog display, user registration, and more.\n- **Middlewares**: Includes middleware functions for tasks like authentication, setting default page titles, guarding routes, and managing user navigation.\n- **Models**: Defines data models for cars, extras, and users.\n- **Services**: Contains service modules responsible for handling authentication, car-related operations, and more.\n- **Static**: Stores static assets such as images and the `styles.css` file.\n- **Utils**: Contains utility functions, including error parsing.\n\n## 🌐 Views\n\nAutoExpo utilizes Handlebars (HBS) templates for rendering dynamic HTML pages. The `views` directory consists of various HBS templates, including layouts, partials, and individual page templates such as the catalog, car details, user registration, and more.\n\n## 🚀 Getting Started\n\nTo run the AutoExpo backend API, follow these steps:\n\n1. Clone the repository to your local machine.\n\n2. Install the required dependencies by running:\n\n   ```bash\n   npm install\n   ```\n\n3. Start the server using the following command:\n\n   ```bash\n   npm start\n   ```\n\n4. The server will start listening on port 3000. Open your web browser and go to http://localhost:3000/ to access the frontend of the application.\n\n## 🔑 Key Features\n\nAutoExpo's backend API offers the following key features:\n\n- **Multi-Page Application**: AutoExpo is a multi-page application, providing a seamless experience for users to explore a wide range of cars and related information.\n\n- **Dynamic HTML Rendering**: The API utilizes Handlebars templates to render dynamic HTML pages, allowing for flexibility in content presentation.\n\n- **Car Management**: Users can access, edit, and delete car listings, making it a comprehensive platform for car enthusiasts. Additionally, administrators have the privilege to create car extras, enhancing the platform's functionality for managing car-related information.\n\n- **User Registration**: The API supports user registration, enabling users to create accounts and interact with the application as registered members.\n\n- **Authentication**: Robust authentication mechanisms are in place to ensure secure access to protected routes and functionalities.\n\n## 🛣️ API Routes\n\nAutoExpo defines various API routes and controllers to handle different functionalities:\n\n- **Home Controller**: _Manages routes for the home and about pages. This route does not require any special permissions to be accessed. It's open to all users._\n\n  - **/** - GET route for the home page.\n  - **/about** - GET route for the about page.\n\n- **Auth Controller**: _Manages user authentication and registration routes. The authentication route is accessible to all guests and does not require any specific permissions._\n\n  - **/auth/login** - GET and POST routes for user login.\n  - **/auth/register** - GET and POST routes for user registration.\n  - **/auth/logout** - GET route for user logout.\n\n- **Car Controller**: _Handles routes related to car management. The car route is accessible to all users and does not require any specific permissions._\n\n  - **/car/edit/:id** - GET and POST routes for editing car details.\n  - **/car/delete/:id** - GET and POST routes for deleting cars.\n\n- **Catalog Controller**: _Manages routes for accessing the car catalog. The catalog route is open to all users and does not require any specific permissions._\n\n  - **/catalog** - GET route for browsing and searching cars.\n  - **/catalog/:id** - GET route for viewing car details.\n\n- **Create Controller**: _Provides routes for creating new car listings. To access the create route, user authentication is required. Users need to be logged in to use this functionality._\n\n  - **/create/car** - GET and POST routes for creating new car listings.\n\n- **Extra Controller**: _Handles routes related to car extras. The extra route has two functionalities:_\n\n  _**Create**_: To access the create extras functionality, users need to have an \"admin\" role. This means they must be administrators to view the page and add new car extras to the database.\n\n  - **/create/car-extras** - GET and POST routes for adding car extras.\n\n  _**Edit**_: To access the edit car extras functionality, user authentication is required. Additionally, the user must be the owner of the car associated with the extras they want to edit.\n\n  - **/edit/:carId/car-extras** - GET and POST routes for modifying car extras.\n\n- **Default Controller**: _Handles errors and renders the 404.hbs template when a route is not found or errors occur during processing. This ensures a user-friendly error page is displayed in such cases._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielzlatanov%2Fautoexpo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielzlatanov%2Fautoexpo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielzlatanov%2Fautoexpo/lists"}