If you'd like to add to our project here's how to get started:
cd workspace
git clone + https link
cd myRepo
git checkout -b feature/yourFeatureName
code .
npm i
npm run knex migrate:latest
npm run knex seed: run
npm run dev
You should be good to go! Remember to checkout and pull from the development branch regularly to ensure your feature branch is not too behind updates. Also checkout the Git Protocol at the bottom of this ReadMe for further details.
If you're having problems it could be because you do not have the .env file set up correctly. Come and see us or send us a message and we can try and help.
Route | Component | Notes |
---|---|---|
/ | App | Root Component |
/ | Nav | Shows on all pages |
/ | Search Modules | |
/categories | View All Categories | |
/categories/:name | View all modules for selected category | |
/module/:id | View individual module | |
/login | Login | NOT Authenticated |
/register | Register | NOT Authenticated |
/profile | User profile, view saved and created modules | Authenticated |
/create | Authenticated | |
--- | --- | --- |
App
-- Nav
-- -- Login
-- -- Register
Home
Categories
-- Module-Card
-- -- Module
Profile
-- Module-Card
-- Create-Module
We have used Figma for our design and Wireframe production, check it out below. https://www.figma.com/file/viw35yDcmX5tLEWZEVabHJ/Dev-Final-Project?node-id=30%3A0
We have used dbdiagram.io for our database design. Check it out below. *we have used Firebase for our users table
Method | Path | Description | NOTES |
---|---|---|---|
POST | /api/v1/register | adds a user - registering them | Firebase |
POST | /api/v1/login | logging in a user and getting user info from DB | Firebase |
GET | /api/v1/modules | gets all modules available | |
GET | /api/v1/modules/:moduleID | gets one module | |
GET | /api/v1/modules/saved | shows the logged in persons saved modules | |
GET | /api/v1/modules/created | shows modules created by logged-in user | |
POST | /api/v1/modules/saved/:id | saves a module to users profile | |
GET | /api/v1/profile (?) | Get the user information | |
--- | --- | --- | --- |
hasLoaded: {
authHasLoaded: false,
modulesHaveLoaded: false,
}
isAuthenticated: true
user: {
displayName: str,
email: str,
uid: str,
saved:[module_id,module_id],
created:[module_id,module_id],
}
modules: [
{
id: 101,
title: 'Intro To JavaScript',
user_id: 10001,
category: 'JavaScript',
duration: 15,
number_of_elements: 5,
description: str,
elements: [
{
id: 900000,
module_id: 101,
type: 'heading',
content: 'heading 1',
order_num: 1
},
{
id: 900001,
module_id: 101,
type: 'paragraph',
content: 'lorum ispum belatio relatio conflatio',
order_num: 2
}
]
}
]
searchModules:[
{
id: int,
title: str
user_id: int,
catergory: tag, //"javascript"
duration: int,
description: str,
number_of_elements: int,
elements: []
},
]
courtesy of Hortense:
- Clone & Make a branch Steps 1 - 4
- Merge your feature Steps 5 - 11
cd workspace
git clone + https link
cd myRepo
git checkout -b feature/aFeature
code .
npm i
npm run knex migrate:latest
npm run knex seed:run
git status
git add .
git commit -m “commit message”
git push origin myBranch
- Feature is done, ready to create a pull request to Development??
git add .
git commit -m “readyToMerge”
git pull origin Development
code .
- Files marked C = Conflict
- Files marked M = Modified
- <<<<< Head = This is you! Current changes, you are HEAD
- <<<<<< Incoming change = pulled in from the Development branch
git add .
git commit -m “mergeTime”
git push origin myBranch
- Create pull request from mybranch to Development (on github)
- Tell the git keeper, they will merge the pull request and there should be 0 conflicts as you have already resolved these in your branch.
git checkout -b feature/myNextFeature
code .
- Reset database
rm server/db/dev.sqlite3
npm run knex migrate:latest
npm run knex seed:run