A social media platform for creatives to receive feedback on their works in progress.
Weeks 11-13 Student Project
Deployed on Netlify
Logo designed by Jessica Gooding
First draft protoyped in Figma for user testing
Add the following information into a .env
file inside the wip-rest-api/
folder:
PGDATABASE=wip_db
PGUSER=user
PGPASSWORD=password
JWT_SECRET=jwtsecret
git clone
this reponpm install
CREATE USER user WITH PASSWORD 'password';
ALTER USER user WITH SUPERUSER;
Initialise the dev and test databases:
CREATE DATABASE wip_db WITH OWNER user;
CREATE DATABASE wip_test WITH OWNER user; -- database name is important for tests to run
\c wip_db;
\i database/init.sql;
\c wip_test;
\i database/init.sql;
"scripts": {
"test": "PGDATABASE=wip_test jest src/test/*.test.js --watch"
}
npm test
to run tests inside wip-rest-api directorynpm run dev
to start development serverALTER DATABASE wip_db OWNER TO user;
You can set everything up using CLI from the project root.
npm run i-all
=> installs everything you need
npm run app
=> runs the front end on localhost:3001
npm run api
=> runs the back end on localhost:3000 (once you've set up your database)
Jest is used for all testing.
npm test
=> run tests for whole project; press q once you're happy with each review
npm run app-test
=> test just the front end
npm run api-test
=> test just the back end
REST API deployed on Heroku
You can make requests to the Heroku App URL, e.g. POST
to https://wip-rest-api.herokuapp.com/signup
:closed_lock_with_key: = Authorization required
Creates access token
Request body example:
{
"username": "username",
"email": "user@example.com",
"bio": "graphic design is my passion",
"vocation": "graphic designer",
"password": "password"
}
Receive access token
Request body example:
{
"username": "username",
"email": "user@example.com"
}
Get your user info when signed in
Update your user info
Request body example:
{
"bio": "I love Comic Sans",
"vocation": "graphic designer"
}
Get a project by project id
Get your watched (followed) projects
Get your own projects
Get your unwatched (unfollowed) projects
Add a new project to your account
Request body example:
{
"project_name": "new project",
"project_description": "first sketch, feedback welcome"
}
Get project steps by project id
Add project steps by project id
Request body example:
{
"step_name": "Sketch in pen",
"step_description": "Adding more details",
"step_link": "image.jpg"
}
Get feedback for step by step id
Add feedback for step by step id
Request body example:
{
"feedback": "wow, that's amazing!",
"tag": "compliment"
}
Update feedback by feedback id
Request body example:
{
"feedback": "wow, that's really amazing - keep up the good work!",
"tag": "compliment"
}
Start watching (following) a post by project id
Stop watching (following) a post by project id
Co-authored-by: Alexreid95 alexreid95@gmail.com Co-authored-by: Hannah Gooding hannah.gooding@yahoo.com Co-authored-by: CampbellDocherty campbellsofitsidocherty@gmail.com Co-authored-by: Jack Heriz-Smith jackherizsmith@gmail.com