- Login and register users
- Display race results and data
- Search for individual race data
- Edit user profile and race times
- View and purchase race gear
-
axios
-
redux
-
react-redux
-
react-router-dom
-
http-proxy-middleware
-
chartJS
-
package.json
- main: server/index.js
-
setupProxy.js => 4000
- Home (/)
- Register (/register)
- Login (/login)
- User Profile (/profile)
- Race Results (/results)
- Shop (/shop)
- src/
- App.js
- App.css
- reset.css
- index.js
- Components/
- Header/
- Header.js
- Header.css
- Home/
- Home.js
- Home.css
- Register/
- Register.js (state)
- Register.css
- Login/
- Login.js (state)
- Login.css
- UserProfile/
- UserProfile.js (state)
- UserProfile.css
- RaceResults/
- RaceResults.js (state)
- RaceResults.css
- Shop/
- Shop.js
- Shop.css
- Header/
- redux/
- reducer.js
- store.js
- setupProxy.js
- express
- express-session
- dotenv
- bcryptjs
- massive
- login => /auth/login
- register => /auth/register
- logout => /auth/logout
- userSession => /api/user_session
- getResults => /api/get_results
- searchByName => /api/search
- getUser => /api/get_user/:userId
- updateUser => /api/update_user/:userId
- updatePassword => /api/update_password/:userId
- updateTimes => /api/update_times/:userId
- deleteUser /api/delete_user/:userId
TO-DO
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
username VARCHAR(20) NOT NULL,
first_name VARCHAR(20) NOT NULL,
last_name VARCHAR(30) NOT NULL,
email VARCHAR(50) NOT NULL,
birthday DATE NOT NULL,
sex VARCHAR(1) NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE results (
result_id SERIAL PRIMARY KEY,
user_id SERIAL FOREIGN KEY REFERENCES users(user_id),
start_time TIME NOT NULL,
end_time TIME NOT NULL,
total_time TIME NOT NULL
);
TO-DO
- Store user info on session
- Store cart items in redux?