Project made with Apollo and Prisma to learn how to make an backend from scratch.
- Clone the repo
- Run
yarn - Create an account in the Firebase and add SDK Admin
- Add the authentication module and enable the email/password method (create an user if you wanna to teste the application)
- If you has docker in your machine, run
docker-compose up -dto create a instance of Postgres - Go to prisma folder and create a .env file
- Add the
DATABASE_URLvariable with the url of your databse - Run
npx prisma migrate dev --name init --preview-featureto creates a new SQL migration file and runs the SQL migration file against the database
- Run
yarn start:dev - Now you can connect with your front-end application running Apollo
- If you don't have a front-end application already, you could generate an
idTokenfrom the user created on the Firebase authentication by running a scrpit that connects with your Firebase project and callsfirebase.auth().signInWithEmailAndPassword(email, password))
- Create account
- Authenticate user
- List all pokemons with basic infos like weight, name, stats etc (like the Pokedex)
- Allows you to save the pokemons that you already catched
- List all only pokemons that you catched
- Delete catched pokemons