-
This is an API for controlling, managing and selling diferents types of tickets, it must be possible to create a user (commun and admin), login that user, create a event and do some crud operation on redis databse, such as (create a event, create a event reserve and ect).
-
Trougth rabbitmq, must be possible to buy a event ticket that was previously reserved.
- Typescritp / Node.js in version v24.20.0 (LTS)
- Nest
- Postgres
- Redis
- RabbitMQ
- PrismaORM
- Docker
- JasonWebToken JWT
- Bcrypt
- Nest/Observable
- Nest/Authguard
- Nest/Swagger
- Use an http request provider such as
InsomniaorPostmanand even theThunderClientextention on vscode IDE to create all the follow endpoints, to be able to test the app.
- Needs to be an
ADMINuser, use aBearertoken.
- Make sure that all the enviroment variables is filled with the rigth configurations, you can rename this file after do it from
.env.exampleto.env, or create a new one ........... it is veryIMPORTANTto the all the stuffs working well.
-
After ckeck the previous step, if you have a docker installed, you just need to run the following comand
yarn docker:up, after docker is ok, open a second terminal and runyarn setup:prisma, for configureprismaORMstuffs. -
Note if you are using a different package manager such as (npm, pnpm etc), just replace (yarn) at the previous step.
-
You can run
npx prisma studio, to see and work with migrations -
You can open in some databse interface such as
beekeeper studio, and access a redis instance by using the credentials on.env -
To see the
rabbitmqstuffs, you can go to your browser and type this urlhttp://localhost:15672/, as well as redis you nedd to pass the credentials to log in.
- This app was created as the same as
MVCarchitecture, trying to keep the good organization and responsability of the layers, to make easy to give maintenance and to be able to implement new stuffs as well.
-
With the application already up, go to your web brownser and type the follow url ....
http://localhost:port/api-doc -
Hint to see the json schemma of the swagger doc type
http://localhost:port/swagger/json