Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khalil-codes/goals-mern-app
Goalsy is a Full Stack App. The Frontend is built using React, Redux and Redux Toolkit. The Backend is built using Node, Express and MongoDB. I've used jsonwebtoken to generate JWT and bcryptjs to hash password in backend. Only Authenticated user is authorized to Add Goal, Delete Goal, View Goals and Update Goal.
https://github.com/khalil-codes/goals-mern-app
Last synced: 27 days ago
JSON representation
Goalsy is a Full Stack App. The Frontend is built using React, Redux and Redux Toolkit. The Backend is built using Node, Express and MongoDB. I've used jsonwebtoken to generate JWT and bcryptjs to hash password in backend. Only Authenticated user is authorized to Add Goal, Delete Goal, View Goals and Update Goal.
- Host: GitHub
- URL: https://github.com/khalil-codes/goals-mern-app
- Owner: Khalil-codes
- Created: 2022-02-25T12:16:36.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T04:44:35.000Z (almost 3 years ago)
- Last Synced: 2023-12-02T14:39:30.416Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 713 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Getting Started with App
Goalsy is a Full Stack App. The Frontend is built using React, Redux and Redux Toolkit. The Backend is built using Node, Express and MongoDB. I've used jsonwebtoken to generate JWT and bcryptjs to hash password in backend. Only Authenticated user is authorized to Add Goal, Delete Goal, View Goals and Update Goal.
## API Endpoints
### User Authentication
1. Register a new user - POST [http://localhost:5000/api/users](http://localhost:5000/api/users)
| Headers | |
| ------------ | :--------------: |
| Content-Type | application/json |Body
```json
{
"name": "Khalil Patiwala",
"email": "[email protected]",
"password": "password"
}
```2. Login a user - POST [http://localhost:5000/api/users/login](http://localhost:5000/api/users/login)
| Headers | |
| ------------ | :--------------: |
| Content-Type | application/json |Body
```json
{
"email": "[email protected]",
"password": "password"
}
```3. Get Logged in user - GET [http://localhost:5000/api/users/me](http://localhost:5000/api/users/me)
| Headers | |
| ------------- | :----------------: |
| Content-Type | application/json |
| Authorization | Bearer |### Goals Routes
1. Get users goals - GET [http://localhost:5000/api/goals](http://localhost:5000/api/goals)
| Headers | |
| ------------- | :----------------: |
| Content-Type | application/json |
| Authorization | Bearer |2. Create a new Goal - POST [http://localhost:5000/api/goals](http://localhost:5000/api/goals)
| Headers | |
| ------------- | :----------------: |
| Content-Type | application/json |
| Authorization | Bearer |Body
```json
{
"text": "Demo Goal Text"
}
```2. Update a Goal - PATCH [http://localhost:5000/api/goals/<:id>](http://localhost:5000/api/goals/<:id>)
| Headers | |
| ------------- | :----------------: |
| Content-Type | application/json |
| Authorization | Bearer |Body
```json
{
"text": "Updated Goal Text"
}
```2. Delete a Goal - DELETE [http://localhost:5000/api/goals/<:id>](http://localhost:5000/api/goals/<:id>)
| Headers | |
| ------------- | :----------------: |
| Content-Type | application/json |
| Authorization | Bearer |## Usage
Install dependencies
```bash
npm install
cd frontend
npm install
```Run app:
### `npm start server`
This will start the backend API at [http://localhost:5000/api/](http://localhost:5000/api/).
### `npm start client`
This will start the frontend at [http://localhost:3000](http://localhost:3000).