This project is a Proof of Concept (POC) for implementing a backend using Node.js, TypeScript, and Express, adhering to the principles of Clean Architecture without object-oriented. The main objective was to explore the feasibility of applying Clean Architecture with a functional programming approach, avoiding object-oriented design.
I am not an expert in functional programming. This project was created as an experiment to explore the possibility of implementing a backend system without object-oriented programming.
Make sure you have the following installed on your machine:
- Node.js: Download Node.js
- pnpm: Install it using the command:
npm install -g pnpm
- Docker: Download Docker
-
Clone the Repository:
git clone https://github.com/dsoaress/node-clean-arch-with-fp.git cd node-clean-arch-with-fp
-
Install Dependencies:
pnpm install
-
Environment Configuration:
Copy the
.env.example
file and rename it to.env
:cp .env.example .env
The project uses a PostgreSQL database, which can be run via Docker. To start the database:
-
Start Docker Compose:
docker-compose up -d
This will start the container with the PostgreSQL database.
-
Initial Database Setup:
Run the following command to run the database migrations:
pnpm prisma migrate deploy
To start the project in development mode, use the command:
pnpm dev
The project should now be running and accessible on http://localhost:3000
.
Contributions are welcome! Please feel free to submit a Pull Request or open an issue if you find a bug or have a suggestion.