{"id":24060014,"url":"https://github.com/antoninobonanno/express-startup-project","last_synced_at":"2025-04-23T04:32:16.693Z","repository":{"id":104565781,"uuid":"421754023","full_name":"AntoninoBonanno/express-startup-project","owner":"AntoninoBonanno","description":"Quick Start Project is a Node.js server based on the Express framework and MySQL database.  In this project we define an elegant and intuitive project structure, able to separate the correct responsibilities between the files...","archived":false,"fork":false,"pushed_at":"2022-01-19T17:35:15.000Z","size":149,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T22:06:14.587Z","etag":null,"topics":["docker","docker-compose","dotenv","express","express-validator","keycloak","morgan","mysql","nodejs","nodejs-server","prisma","socket-io","typescript","winston"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntoninoBonanno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"ko_fi":"antoninobonanno"}},"created_at":"2021-10-27T09:23:09.000Z","updated_at":"2025-02-07T14:35:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f1f87f2-e052-4a09-95b6-0570aabbebe7","html_url":"https://github.com/AntoninoBonanno/express-startup-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoninoBonanno%2Fexpress-startup-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoninoBonanno%2Fexpress-startup-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoninoBonanno%2Fexpress-startup-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoninoBonanno%2Fexpress-startup-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntoninoBonanno","download_url":"https://codeload.github.com/AntoninoBonanno/express-startup-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250371916,"owners_count":21419685,"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":["docker","docker-compose","dotenv","express","express-validator","keycloak","morgan","mysql","nodejs","nodejs-server","prisma","socket-io","typescript","winston"],"created_at":"2025-01-09T06:38:51.674Z","updated_at":"2025-04-23T04:32:16.217Z","avatar_url":"https://github.com/AntoninoBonanno.png","language":"TypeScript","funding_links":["https://ko-fi.com/antoninobonanno","https://ko-fi.com/C0C46QJ0M"],"categories":[],"sub_categories":[],"readme":"# Express Startup Project\n\nQuick Start Project is a Node.js server based on the Express framework and MySQL database.  \n\nIn this project we define an elegant and intuitive project structure, able to separate the correct responsibilities between the files. \nFurthermore, the basic functionalities of an Express server are already implemented, to have a ready-to-use project, where the only concern is to implement the API.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/C0C46QJ0M)\n\n### Features\n\n- [Express Framework](https://expressjs.com/) for the basis of the application\n- Easy configuration environment via .env file\n- APIs protection based on [Keycloak](https://www.keycloak.org/) IAM. (See [documentation](/docs/keycloak.md))\n- [Prisma](https://www.prisma.io/) as database client ORM.   \u003csub\u003e\u003csup\u003e(MySQL was used, but you can easily change database type)\u003c/sup\u003e\u003c/sub\u003e\n- Custom Exceptions and automatic error handling. (See [documentation](/docs/exceptions.md))\n- Custom Logger based on [winston](https://github.com/winstonjs/winston#readme) and [morgan](https://github.com/expressjs/morgan#readme) libraries. (See [documentation](/docs/logger.md))\n- Easily Validations based on [express-validator](https://express-validator.github.io/docs/) library. (See [documentation](/docs/validations.md))\n- Secure Real time based on [Socket.io](https://socket.io/) library. (See [documentation](/docs/real-time.md))\n- Easily release with [Docker](https://www.docker.com/). (See [documentation](/docs/docker-releases.md))\n\n## Directory Structure\n```\nproject\n│   .env   \n│   README.md\n├── docker            # Files required for creating staging and production docker images\n├── docs              # Documentation\n├── logs              # Automatically generated, contains application logs divided into days\n├── prisma            \n│   │   schema.prisma # The schema definition of the Models\n│   └── migrations    # Contains the migration files\n├──src\n│  │   app.ts\n│  │   environment.ts\n│  ├── controllers    # The controllers handles all the logic and sending responses with correct codes\n│  ├── exceptions     # The custom exceptions\n│  ├── helpers        # Helper functions / classes\n│  ├── interfaces     # The custom interfaces\n│  ├── middlewares    # The custom middlewares\n│  ├── routes         # The API routes maps to the Controllers\n│  ├── services       # The services contains the database queries and returning objects or throwing errors\n│  └── validations    # Validations to validate data before being processed by controllers (used in routes)\n└── storage           # Automatically generated, contains the uploaded files from users\n```\n\n## Development Instructions\n\n1. Copy and rename `.env.example` file to `.env` and edit settings (See [Keycloak settings documentation](/docs/keycloak.md#keycloak-settings))\n2. Run `npm install` command to install dependencies\n3. Run `npx prisma migrate dev` command to initialize the database or `npx prisma generate` command if the database already exists\n4. Run `npm start` or `npm run dev` command to run local server (it restarts each time the code is changed)\n\nNOTE:\n- You can run `npm run build` command to build dist server (you need add .env file manually inside /dist directory)\n- You can run `npx prisma studio` command to open Prisma Studio in the browser (is a visual editor for the data in your database)\n- import the file `docs/Express Startup Project.postman_collection.json` to Postman to test the API\n\n### TODO\n- [ ] Make a version without Keycloak, use jwt\n\n## Getting Involved\n\nWant to help out? Found a bug? Missing a feature? Post an issue on our [issue tracker](https://github.com/AntoninoBonanno/express-startup-project/issues).\n\nI welcome contributions no matter how small or big!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninobonanno%2Fexpress-startup-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoninobonanno%2Fexpress-startup-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoninobonanno%2Fexpress-startup-project/lists"}