OVERis a TypeScript and Node.js plug & play comments micro-service that allows you create a comments, get, filter, rating, and paginate the incoming data from the API's endpoint .. and also nested replies using one to many self-relationship.
Built using pure express.js application with MySQL without using an ORM.
Project Structure
OVER
|--dev // Dev directory.
| |--types // includes TypeScript's local types.
| | |--root.d.ts
|--node_modules // Node modules directory.
|--src // Source directory.
| |--app // App directory.
| | |--Controllers // Includes app's controllers (e.g. HomeController.ts).
| | |--Http // Http directory which includes (middlewares, kernel. router..)
| | | |--Middleware // Place to create and register a middlewares.
| | | |--Kernel.ts // Server's kernel class.
| | | |--Router.ts // An easy router class to work with routes (inspired by Laravel).
| | |--Models // Includes app's models (e.g. Comment.ts).
| | |--Validations // Request's validation.
| | |--helpers.ts // Includes helpers methods to be used elsewhere in the application.
| |--config // Config directory
| | |--app.ts // Application's configurations.
| | |--database.ts // Database's configurations.
| |--database // Database directory
| | |--connection.ts // Database Connection.
| | |--migrations.ts // Database mifrations.
| |--routes // Routes directory.
| | |--api.ts // api routes.
| |--server.ts // Server class.
|--.env // environment variables file.
|--.gitignore // gitignore file.
|--nodemon.json // Nodemon configurations.
|--package.json
|--package-lock.json
|--tsconfig.json // Typescript config file.
_________________________
13 directories, 21 files