🚧 version 2 of the API is currently under development. Kindly check v1 branch to see the full features 🚧
Vet-Care is a veterinary clinic management system designed to handle staff, clients, pets, appointments, appointment notifications, and payments. The system follows clean architecture principles, ensuring clear separation of concerns and maintainability.
Expressjs - TypeScript - Postgres - Prisma - Joi - Jsonwebtoken - Swagger
The second version of the API adheres to clean architecture principles. The application is structured into three distinct layers:
-
The presentation layer handles external communication with various systems, including APIs, UI components, and HTTP/S requests.
-
It acts as the entry point for external interactions and translates them into domain-specific use cases.
-
Examples of components in this layer include controllers, routes, and user interfaces.
-
The domain layer encapsulates the core business rules, entities, data transfer objects (DTOs), validation logic, and use cases.
-
Entities represent the fundamental business concepts (e.g., staff, clients, pets) and contain the essential logic.
-
Use cases define how these entities interact and enforce business rules.
-
Validation rules are also part of this layer, ensuring data integrity.
-
DTOs facilitate data exchange between layers.
-
The domain layer remains independent of external concerns.
-
Infrastructure deals with external services and technical details.
-
It includes components responsible for database access, authentication, external APIs, and other integrations.
-
The infrastructure layer interacts with databases (e.g., Postgres), third-party libraries (e.g., Prisma), and validation tools (e.g., Joi).
-
Keeping infrastructure separate from the domain ensures flexibility and testability.
-
The application follows the Vertical Slice technique, where each major feature or use case has its own dedicated folder structure.
-
Within each feature folder, you’ll find subfolders corresponding to the three layers (presentation, domain, and infrastructure).
-
Any shared code or utilities between different features reside at the root level within their respective layers.
This architecture promotes maintainability, scalability, and clear separation of concerns. 🏗️🚀
Postman
- Clone this repository.
- Install dependencies using
npm install. - Set up your environment variables (e.g., database connection, Elasticemail credentials, etc.).
- Run the application using
npm run start.
-
Prerequisites
- Ensure that you have Docker installed on your system. If not, follow the official Docker installation guide for your operating system:
- Install Docker on Linux
- Install Docker on macOS
- Install Docker on Windows
- Ensure that you have Docker installed on your system. If not, follow the official Docker installation guide for your operating system:
-
Building and Running the Docker Container
- Open a terminal and navigate to the root directory of your project.
- Start the container using Docker Compose:
docker-compose up -d
- Your Kryptonite App should now be have access to the postgres database running in the container.
-
Stopping and Cleaning Up
- To stop the containers, run:
docker-compose down
- To remove the containers and associated volumes, use:
docker-compose down -v
- To stop the containers, run:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT