8000 GitHub - mbagatini/nlw-setup: NLW SETUP - Ignite - A full application (backend, frontend and mobile) to track habits
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mbagatini/nlw-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Next Level Week - Ignite

NLW SETUP - One step every day

NLW License

πŸ“… About this project

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.

βš™ Backend

Technology Stack

How to run it?

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

API routes

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.

Push notifications

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.

push

πŸ’» Front-end

web home page

Technology Stack

App purpose

  • Create new habi 82A0 ts
  • Keep habits on track

How to run it?

Enter on web folder:

$ cd web

Install the dependencies:

$ npm install

Let's start the application:

$ npm run dev

πŸ“± Mobile

Technology Stack

App purpose

The mobile project is still under development due some environment problems with SO. Hope to finish it soon.

How to run it?

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.

🎨 Application layout

You can check the layout of this project clicking in the link below:

You must have Figma account to access it!

πŸ“ License

This project is under MIT license.

About

NLW SETUP - Ignite - A full application (backend, frontend and mobile) to track habits

Topics

Resources

Stars

Watchers

Forks

0