This project is an implementation of Clean Architecture using Express and TypeScript. The goal is to create an application structure that is modular, easy to understand, and easy to develop.
- Express Server: Web server using Express.js.
- TypeScript: Utilizes TypeScript for safer and more structured code.
- Clean Architecture: Separates code into several layers (domain, application, infrastructure, presentation) to maintain separation of concerns.
express-ts-clean-arch/
├── src/
│ ├── domain/
│ ├── application/
│ ├── infrastructure/
│ └── presentation/
├── .env
├── .gitignore
├── package.json
├── tsconfig.json
└── yarn.lock
Ensure you have Node.js and Yarn installed on your system.
-
Clone the repository:
git clone https://github.com/bangadam/express-ts-clean-arch.git
-
Navigate to the project directory:
cd express-ts-clean-arch
-
Install dependencies:
yarn install
-
Make sure the
.env
file is properly configured. Example:PORT=9000
-
Database configuration can be found at:
src/application/helpers/databaseConfiguration.ts
Adjust the settings according to your environment.
Run the following command to start the application:
yarn start
The application will run at http://localhost:9000
.
yarn build
: Build the TypeScript application into JavaScript.yarn dev
: Run the application with nodemon for development.
Contributions are welcome. Please create an issue or pull request for improvements and new features.
This project is licensed under the MIT License.