├── README.md
├── index.js
├── my-app
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
└── src
│ ├── App.css
│ ├── App.js
│ ├── App.test.js
│ ├── app
│ └── store.js
│ ├── features
│ └── counter
│ │ ├── Counter.js
│ │ ├── Counter.module.css
│ │ ├── counterAPI.js
│ │ ├── counterSlice.js
│ │ └── counterSlice.spec.js
│ ├── index.css
│ ├── index.js
│ ├── logo.svg
│ ├── reportWebVitals.js
│ └── setupTests.js
├── package-lock.json
├── package.json
└── test-app
└── app.js
/README.md:
--------------------------------------------------------------------------------
1 | # food-hero
2 | # 23 Final Project: MERN Stack Single-Page Application
3 |
4 | Projects have played a key role in your journey to becoming a full-stack web developer. As you apply for development jobs, your portfolio is absolutely vital to opening doors to opportunities. Your portfolio showcases high-quality deployed examples of your work, and you can use your finished projects for that very purpose.
5 |
6 | This project is a fantastic opportunity to show employers your collaborative skills and coding abilities, especially in the context of a scalable, user-focused MERN app. Remember that employers want to see what you can do, but they also want to see how you work with other developers. The more examples of deployed collaborative work you have in your portfolio, the more likely you are to get an interview and a job.
7 |
8 | ## Project Requirements
9 |
10 | Your group will use everything you’ve learned throughout this course to create a MERN stack single-page application that works with real-world data to solve a real-world challenge, with a focus on data and user demand. This project will provide you with the best opportunity to demonstrate your problem-solving skills, which employers will want to see during interviews. Once again, the user story and acceptance criteria will depend on the project that you create, but your project must fulfill the following requirements:
11 |
12 | * Use React for the front end.
13 |
14 | * Use GraphQL with a Node.js and Express.js server.
15 |
16 | * Use MongoDB and the Mongoose ODM for the database.
17 |
18 | * Use queries and mutations for retrieving, adding, updating, and deleting data.
19 |
20 | * Be deployed using Heroku (with data).
21 |
22 | * Have a polished UI.
23 |
24 | * Be responsive.
25 |
26 | * Be interactive (i.e., accept and respond to user input).
27 |
28 | * Include authentication (JWT).
29 |
30 | * Protect sensitive API key information on the server.
31 |
32 | * Have a clean repository that meets quality coding standards (file structure, naming conventions, best practices for class and id naming conventions, indentation, high-quality comments, etc.).
33 |
34 | * Have a high-quality README (with unique name, description, technologies used, screenshot, and link to deployed application).
35 |
36 | ### CSS Styling
37 |
38 | Instead of using a CSS library like Bootstrap, consider one of the following suggestions:
39 |
40 | * Look into the concept of CSS-in-JS, which abstracts CSS to the component level, using JavaScript to describe styles in a declarative and maintainable way. Some popular libraries include [styled-components](https://styled-components.com/) and [Emotion](https://emotion.sh/docs/introduction).
41 |
42 | * Try using a component library, such as [Semantic UI](https://semantic-ui.com/), [Chakra UI](https://chakra-ui.com/), or [Ant Design](https://ant.design/).
43 |
44 | * Create all the CSS for your application just using CSS.
45 |
46 | Ultimately, it doesn't matter which of these options you choose—it just needs to look professional and be mobile-friendly.
47 |
48 | ### Payment Platform
49 |
50 | Consider integrating the Stripe payment platform. Even if you don’t create an e-commerce application, you could set up your site to accept charitable donations.
51 |
52 | ### Bonus
53 |
54 | Although this is not a requirement for your project, see if you can also implement functionality to meet the minimum requirements of a PWA:
55 |
56 | * Uses a web manifest
57 |
58 | * Uses a service worker for offline functionality
59 |
60 | * Is installable
61 |
62 | ## Presentation Requirements
63 |
64 | Use this [project presentation template](https://docs.google.com/presentation/d/10QaO9KH8HtUXj__81ve0SZcpO5DbMbqqQr4iPpbwKks/edit?usp=sharing) to address the following:
65 |
66 | * Elevator pitch: a one minute description of your application
67 |
68 | * Concept: What is your user story? What was your motivation for development?
69 |
70 | * Process: What were the technologies used? How were tasks and roles broken down and assigned? What challenges did you encounter? What were your successes?
71 |
72 | * Demo: Show your stuff!
73 |
74 | * Directions for Future Development
75 |
76 | * Links to the deployed application and the GitHub repository. Use the [Guide to Deploy with Heroku and MongoDB Atlas](https://coding-boot-camp.github.io/full-stack/mongodb/deploy-with-heroku-and-mongodb-atlas) on The Full-Stack Blog if you need a reminder on how to deploy to Heroku.
77 |
78 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const { applyMiddleware } = require('redux');
3 | const PORT =3000;
4 | const app = express();
5 |
6 | // create Middleware
7 | function logger (req, res, next) {
8 | console.log(`[${Date.now()}] ${req.method} ${req.url}`);
9 | next();
10 | }
11 |
12 | app.use(logger);
13 |
14 | // testing if the router is working correctly
15 | app.get('/test', (req, res) =>{
16 | res.json({ok:true});
17 | });
18 |
19 | app.get('/greet/:name', (req, res) =>{
20 | res.json({greeting: `Hello ${req.params.name}!`});
21 | });
22 |
23 | app.listen(PORT, () => console.log(`Server is now listening on port ${PORT}`));
--------------------------------------------------------------------------------
/my-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/my-app/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App and Redux
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app), using the [Redux](https://redux.js.org/) and [Redux Toolkit](https://redux-toolkit.js.org/) template.
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
--------------------------------------------------------------------------------
/my-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@reduxjs/toolkit": "^1.9.1",
7 | "@testing-library/jest-dom": "^5.16.5",
8 | "@testing-library/react": "^13.4.0",
9 | "@testing-library/user-event": "^14.4.3",
10 | "react": "^18.2.0",
11 | "react-dom": "^18.2.0",
12 | "react-redux": "^8.0.5",
13 | "react-scripts": "5.0.1",
14 | "web-vitals": "^2.1.4"
15 | },
16 | "scripts": {
17 | "start": "react-scripts start",
18 | "build": "react-scripts build",
19 | "test": "react-scripts test",
20 | "eject": "react-scripts eject"
21 | },
22 | "eslintConfig": {
23 | "extends": [
24 | "react-app",
25 | "react-app/jest"
26 | ]
27 | },
28 | "browserslist": {
29 | "production": [
30 | ">0.2%",
31 | "not dead",
32 | "not op_mini all"
33 | ],
34 | "development": [
35 | "last 1 chrome version",
36 | "last 1 firefox version",
37 | "last 1 safari version"
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/my-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/softdev050/Software-Engineer/d028c5ca47f6963cd0c3276349fa4085383f5067/my-app/public/favicon.ico
--------------------------------------------------------------------------------
/my-app/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |