{"id":21838908,"url":"https://github.com/thatbeautifuldream/express-starter","last_synced_at":"2025-04-14T10:35:04.247Z","repository":{"id":159306669,"uuid":"634500035","full_name":"thatbeautifuldream/express-starter","owner":"thatbeautifuldream","description":"A boilerplate for building web applications with Express.js","archived":false,"fork":false,"pushed_at":"2023-12-29T11:37:32.000Z","size":89,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T23:41:55.858Z","etag":null,"topics":["biolerplate","express-starter","express-template","express-template-generator"],"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/thatbeautifuldream.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":"2023-04-30T10:28:57.000Z","updated_at":"2024-12-22T12:29:30.000Z","dependencies_parsed_at":"2024-12-10T20:39:00.684Z","dependency_job_id":"c562a6c6-9e4c-4393-90d1-14ecc8e2cb66","html_url":"https://github.com/thatbeautifuldream/express-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatbeautifuldream%2Fexpress-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatbeautifuldream%2Fexpress-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatbeautifuldream%2Fexpress-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatbeautifuldream%2Fexpress-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thatbeautifuldream","download_url":"https://codeload.github.com/thatbeautifuldream/express-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248863351,"owners_count":21173984,"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":["biolerplate","express-starter","express-template","express-template-generator"],"created_at":"2024-11-27T21:15:04.678Z","updated_at":"2025-04-14T10:35:04.228Z","avatar_url":"https://github.com/thatbeautifuldream.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express Starter Kit\n\n\u003e A boilerplate for building web applications with [Express](http://expressjs.com/). ⚠️ This project is in active development and is not yet ready for production use. This template will be updated as the project matures and my learnings about various industry practices. This project is an active fork of the implemetations by [Sanket Singh](https://github.com/singhsanket143)'s [repository](https://github.com/singhsanket143/Base-Node-Project-Template).\n\n[![image](https://user-images.githubusercontent.com/28717686/235532155-6878d8f4-ec14-4c9d-84a7-aa9fa0afaadf.png)](https://github.com/thatbeautifuldream/express-starter)\n\n## Features\n\n- **No configuration.** Start developing instantly.\n- **No lock-in.** Easily migrate to other tools and frameworks.\n- **No boilerplate.** Start with a blank canvas with just bare minimum code to setup the server.\n- **No bloat.** Only the bare minimum dependencies to get you started.\n- **No black box.** Understand every line of code and customize it to your needs.\n- **No legacy.** Uses the latest version of Express and Node.js.\n\n## Getting Started\n\n### Prerequisites\n\n- [Git](https://git-scm.com/)\n- [Node.js](https://nodejs.org/en/)\n- [VS Code](https://code.visualstudio.com/)\n- [Yarn](https://yarnpkg.com/en/) (optional)\n- [Pnpm](https://pnpm.js.org/) (optional)\n\n### Installation\n\n- Clone the repository\n\n```bash\ngit clone \u003crepository-url\u003e\n```\n\n- Delete the existing git repository\n\n```bash\nrm -rf .git\n```\n\n- Initialize a new git repository\n\n```bash\ngit init\n```\n\n- Install dependencies using npm or your favorite package manager\n\n```bash\nnpm install\n```\n\n- Setup environment variables in the .env file at `src/.env` path with contents as follows\n\n```bash\nPORT=5000\n```\n\n- Initialise the project with sequelize, which may create a config, migrations, models and seeders folder\n\n```bash\nnpx sequelize-cli init\n```\n\n- Start the development server\n\n```bash\nnpm run dev\n```\n\n## Project Structure and Conventions\n\n\u003e This is a base node js project template, which anyone can use as it has been prepared, by keeping some of the most important code principles and project management recommendations. Feel free to change anything.\n\n- `src` -\u003e Inside the src folder all the actual source code regarding the project will reside, this will not include any kind of tests. (You might want to make separate tests folder)\n\nLets take a look inside the `src` folder\n\n- `config` -\u003e In this folder anything and everything regarding any configurations or setup of a library or module will be done. For example: setting up `dotenv` so that we can use the environment variables anywhere in a cleaner fashion, this is done in the `server-config.js`. One more example can be to setup you logging library that can help you to prepare meaningful logs, so configuration for this library should also be done here.\n\n- `routes` -\u003e In the routes folder, we register a route and the corresponding middleware and controllers to it.\n\n- `middlewares` -\u003e they are just going to intercept the incoming requests where we can write our validators, authenticators etc.\n\n- `controllers` -\u003e they are kind of the last middlewares as post them you call you business layer to execute the budiness logic. In controllers we just receive the incoming requests and data and then pass it to the business layer, and once business layer returns an output, we structure the API response in controllers and send the output.\n\n- `repositories` -\u003e this folder contains all the logic using which we interact the DB by writing queries, all the raw queries or ORM queries will go here.\n\n- `services` -\u003e contains the buiness logic and interacts with repositories for data from the database\n\n- `utils` -\u003e contains helper methods, error classes etc.\n\n- `index.js` -\u003e this is the entry point of the application, where we start the server and register all the routes and middlewares.\n\n- `rest.http` -\u003e this is a file which contains all the API endpoints and their request and response bodies, this file can be used to test the APIs using the REST client extension in VS Code.\n\n## Package Dependencies\n\n- [Express](https://expressjs.com/) - Fast, unopinionated, minimalist web framework for Node.js\n- [Sequelize](https://sequelize.org/) - Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.\n- [Sequelize CLI](https://www.npmjs.com/package/sequelize-cli) - The Sequelize Command Line Interface (CLI)\n- [Morgan](https://www.npmjs.com/package/morgan) - HTTP request logger middleware for node.js\n- [Dotenv](https://www.npmjs.com/package/dotenv) - Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env\n- [Nodemon](https://www.npmjs.com/package/nodemon) - Nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.\n- [Prettier](https://prettier.io/) - Prettier is an opinionated code formatter.\n- [ESLint](https://eslint.org/) - ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.\n- [Jest](https://jestjs.io/) - Jest is a delightful JavaScript Testing Framework with a focus on simplicity.\n- [HTTP Status Codes](https://www.npmjs.com/package/http-status-codes) - Constants enumerating the HTTP status codes.\n- [Winston](https://www.npmjs.com/package/winston) - A logger for just about everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatbeautifuldream%2Fexpress-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatbeautifuldream%2Fexpress-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatbeautifuldream%2Fexpress-starter/lists"}