/tech-lound

Online technology course platform.

Primary LanguageTypeScript

tech-lound logo TechLound

Description   |    Requirements   |    Technologies   |    Usage   |    Demonstration


License Repo size Top lang Stars repo Forks repo Pull requests Last commit

Report bug · Request feature


Description

The project is a platform for programming courses, divided into microservices with the idea of ​​separating business rules from the application and atomizing their processes.

The services communicate using Apache Kafka as Message Broker, and are integrated into a third service called gateway, which joins the purchases and classroom api using Apollo Gateway so that only one End-Point is needed to be consumed by the Front End, and application authentication is done using Auth0.

This project was developed for me to learn more about GraphQL, Apollo, Kafka and Docker. It was my first contact with these technologies, and I really enjoyed developing this project with them. I intend to use GraphQL in more projects that I will create in the future and this project was the basis for my knowledge of the technology.

I created an Application Flow to facilitate the understanding of the integration and union between the services:

Application Flow

Requirements

Technologies

  • Yarn Workspaces
  • Typescript
  • NestJs
  • GraphQL
  • Apollo Federation
  • Apollo Gateway
  • Apache Kafka
  • Prisma
  • PostgreSQL
  • Next.js
  • Auth0
  • Apollo Client
  • Codegen
  • TailwindCss
  • Eslint
    • Airbnb-config with another pessoal rules
    • Import helpers plugin
  • Prettier
  • Commitlint
    • Commitizen

Usage

You can clone it on your pc using the command:

git clone https://github.com/Lissone/tech-lound.git
cd tech-lound

❗ You must have Docker installed on your machine to get the container up. Up Kafka and Postgres services in a Docker container on your local machine using:

docker-compose up -d
# View all running containers
docker ps

❗ As the application authentication was performed by a third-party service (Auth0), it is necessary to configure it through the technology website, accessing this link. There you will get all the missing environment variables.

❗ It is necessary to configure the environment variables of each of the projects, access the individual .env.example file of each of the projects to facilitate the addition.

Install dependencies using:

yarn
#or
npm install

Generate the Prisma Client on the two services that use Prisma, using:

# Purchases service
yarn purchases:prisma
# Classroom service
yarn classroom:prisma
# or using npm

Run Purchases service:

# Use a dedicated terminal 
yarn dev:purchases
#or
npm run dev:purchases

Run Classroom service:

# Use a dedicated terminal 
yarn dev:classroom
#or
npm run dev:classroom

Run Gateway service:

# Use a dedicated terminal 
yarn dev:gateway
#or
npm run dev:gateway

Run Web:

# Use a dedicated terminal 
yarn dev:web
#or
npm run dev:web

ℹ️ You can view the database from Prisma Studio on the two services that use Prisma, using:

# Purchases / Classroom service
yarn prisma-studio
#or
npm run prisma-studio

License

Distributed under the MIT License. See LICENSE for more information.

Made with ❤️ by Lissone