Next Level Week - Ignite
This project was inspired by the code frequency of Github, but instead of commits, it trackers habits!
It's made for you to register the activities you want to do and when to do them. Eg: read for 1 hour per day, practice yoga 3x a week, and drink 2L of water every day...
Then every day you keep the activities on track, crossing the activities you could accomplish off the list and checking the ones still pending.
This application is divided into three parts: the server, web, and mobile app.
Clone the repository to your machine.
Enter on server folder:
$ cd server
Install the dependencies:
$ npm install
Copy the .env.example
file and change it's content to your environment.
It contains the database file and the JWT token secret.
Now it's time to run the migration:
$ npx prisma migrate dev
A seed file was created to glam up the summary table. So, run the command to seed the database:
$ npx prisma seed
If the configuration is ready and connected to the database, let's start the application:
$ npm run dev
Inside server folder, there is a file called Insomnia-nlw-setup.json
. This file contains all the requests provided by the API.
Import it on Insomnia and it's ready to use.
This project was a nice opportunity to implement push notifications using the web-push library.
You can check more details about Push API in the Mozilla official documentation.
The cool thing is that it's possible to send notifications from backend to the user using this API, even though the web application is not opened on the browser. The magic behind it is the use of service workers on frontend side.
- Create new habi 82A0 ts
- Keep habits on track
Enter on web folder:
$ cd web
Install the dependencies:
$ npm install
Let's start the application:
$ npm run dev
The mobile project is still under development due some environment problems with SO. Hope to finish it soon.
Enter on mobile folder:
$ cd mobile
Install the dependencies:
$ npm install
Let's start the application:
$ expo start
You can run the application directly on your phone, using the Expo Go app, or use an emulator.
You can check the layout of this project clicking in the link below:
You must have Figma account to access it!
This project is under MIT license.