NB : Project is in active development phase and should be used as a demonstration of the described concepts.
GraphQL API implementation inspired by Domain Driven Design & Clean Architecture. It demonstrates Inversion Of Control through Dependency Injection a NodeJS
Kulu exists to ensure that people working on web backends, prototypes can easily have a base structure that can have them going in a jiffy.
It's simplistic, and with it comes an implementation informed by different experiences & lessons learnt from using different frameworks and approaches when building web applications.
- Extensible - Designed to allow easy addition of new capabilities & functionality.
- GraphQL Support - Default API interface is GraphQL leveraging apollo libraries.
- Graph Federation - Built as a subgraph that can be exposed via a federated gateway to enable building of applications as microservices.
- ++more
- NodeJS installation (Tested on v18.12.1).
- Database (Tested with MySQL)(Since its using Prisma, any compatible database should be fine)
docker-compose up -d
- NestJS CLI
npm install @nestjs/cli -g
- pnpm (instead of npm)
npm install pnpm -g
- Clone Kulu repository
git clone https://github.com/timkatee/kulu.git
- Install dependencies
pnpm install
- Create .env file in the root dir and add prisma database config, if mysql
DATABASE_URL='mysql://username:password@localhost:3306/database'
PRISMA_DATA_MODEL_PATH='./src/infrastructure/database/prisma/schema.prisma'
- Run migrations for database table creation, for an existing database with tables refer to Prisma Documentation
npx prisma migrate dev
- Start the admin service
turbo run start:dev --filter=@kulu/admin
(you can use pnpm as well, using turbo just for the sake of it...) - Start the gateway service
turbo run start:dev --filter=@kulu/gateway
(you can use pnpm as well, using turbo just for the sake of it...) - Access the project on http://localhost:4000/graphql . Port might be different based on your .env PORT value. x. Have fun