Chitter is a simple social media platform that allows users to post short messages known as "peeps". This repository contains the frontend and backend code for the Chitter application.
-
Clone the repository to your local machine.
-
Install dependencies for the frontend:
cd FrontEnd npm install
-
Install dependencies for the backend:
cd BackEnd npm install
-
Start the backend server:
cd BackEnd npm start
-
Start the frontend development server:
cd FrontEnd npm run dev
For tests, use the following command:
npm test
Component | Description | Children |
---|---|---|
App | The root component that manages the routing | - ChitterHome |
and main structure of the application. | - SignInPage | |
- SignUpPage | ||
ChitterHome | Represents the main content of the Chitter | - Sidebar |
application, displaying user's feed. | - PeepForm | |
- PeepCard | ||
SignInPage | Renders the sign-in form for users to log in. | - SignInForm |
SignUpPage | Displays the sign-up form for new users to | - SignUpForm |
create an account on Chitter. |
Component | Data Received | Data Passed | Data Returned | Actions |
---|---|---|---|---|
App | ||||
ChitterHome | signedIn, peeps, user | handleAddPeep | ||
PeepForm | user | handleAddPeeps | ||
PeepCard | peeps | |||
Sidebar | signedIn, user | |||
SignInPage | handleSignIn | |||
SignUpPage | ||||
authenticationHelpers.js | checkSignIn | |||
chitterAPICalls.js | getPeeps, addPeep | |||
asyncFunctions |
Index Route (/)
- Test that a get request returns all peeps.
- Test that a post request ads a new peep.
Authentication Routes (/signIn & /signUp)
- Test that it successfully signs in a user with correct credentials.
- Test that it returns 401 for invalid credentials.
- Test that it returns 500 for an existing user.
- Test that it gets all peeps.
- Test that it adds a new peep.
- Test that it gets a user by email.
- Test that all peeps are returned.
- Test that a new peep is added.
- Test that checkSignIn returns true when API call is successful.
- Test that getPeeps returns peeps when API call is successful.
- Test that addPeep adds a peep when API call is successful.
- Test that addPeep handles error response.
- Ed's videos for connecting to MongoDB and Todo app walkthrough.
- Mongoose Docs
- Chai Docs
- Material UI Icons
- Github Badges