Skip to content

SmartTabDev/knowledge-base-system

Repository files navigation

Project setup

Set enviroment variables in .env file

OPENAI_API_KEY=

Database migration

$ npx prisma migrate dev

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Run tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Run the project with docker

docker-compose up

Rationale for my architectural choice

When evaluating software architecture options, it’s essential to consider the advantages and disadvantages of both monolithic and microservice architectures. For this particular application, I have chosen a monolithic architecture for several compelling reasons:

  1. Simplicity: The monolithic approach simplifies the development process by consolidating all components into a single codebase. This unified structure allows for easier development, testing, and deployment, as all functionalities are readily accessible in one place.

  2. Performance: In a monolithic architecture, direct function calls within the application can lead to enhanced performance. Unlike microservices, which require inter-service communication over a network, the absence of this overhead results in faster execution times.

  3. Easier Debugging: With all components housed within a single application, debugging becomes more straightforward. Developers can trace issues across the entire system without the complexity of navigating multiple services, making it easier to identify and resolve problems quickly.

  4. Suitability for Current Needs: As this is a test application, there is no immediate requirement for scalability or flexibility. The monolithic architecture is well-suited for projects of this scale, where the focus is on functionality rather than extensive growth or adaptability.

Conclusion

In summary, monolithic architecture is particularly advantageous for small to medium-sized projects due to its simplicity, performance benefits, and ease of debugging. Conversely, microservice architecture shines in larger projects that demand scalability and flexibility. For this application, the monolithic approach provides an effective solution tailored to its current requirements.

API documentation

Welcome to the API documentation!

For a comprehensive overview of the available endpoints and their functionalities, please visit the Swagger interface at the following URL:

Swagger URL: [PATH]/swagger

Explore the API specifications, test endpoints, and view response formats directly through the Swagger UI.

Assumptions and limitations

To enhance scalability and improve application performance, it is essential to consider transitioning the architecture to a microservices model. This shift will enable better resource management and allow for more efficient scaling as the application grows.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published