├── .gitignore ├── ProcFile ├── README.md ├── backend ├── config │ └── db.js ├── controllers │ ├── noteController.js │ └── userController.js ├── data │ └── notes.js ├── middleware │ ├── authMiddleware.js │ └── errorMiddleware.js ├── models │ ├── noteModel.js │ └── userModel.js ├── routes │ ├── noteRoutes.js │ └── userRoutes.js ├── seeder.js ├── server.js └── utils │ └── generateToken.js ├── frontend ├── README.md ├── package-lock.json ├── package.json ├── public │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.css │ ├── App.js │ ├── actions │ │ ├── notesActions.js │ │ └── userActions.js │ ├── background.jpg │ ├── background.webp │ ├── background1.jpg │ ├── bootstrap.min.css │ ├── components │ │ ├── ErrorMessage.js │ │ ├── Footer.js │ │ ├── Header.js │ │ ├── Loading.js │ │ ├── MainScreen.js │ │ └── Screen.css │ ├── constants │ │ ├── notesConstants.js │ │ └── userConstants.js │ ├── index.css │ ├── index.js │ ├── reducers │ │ ├── notesReducers.js │ │ └── userReducers.js │ ├── reportWebVitals.js │ ├── screens │ │ ├── LandingPage │ │ │ ├── LandingPage.js │ │ │ └── LandingStyles.css │ │ ├── LoginScreen │ │ │ ├── LoginScreen.css │ │ │ └── LoginScreen.js │ │ ├── MyNotes │ │ │ └── MyNotes.js │ │ ├── ProfileScreen │ │ │ ├── ProfileScreen.css │ │ │ └── ProfileScreen.js │ │ ├── RegisterScreen │ │ │ ├── RegisterScreen.css │ │ │ └── RegisterScreen.js │ │ └── SingleNote │ │ │ ├── CreateNote.js │ │ │ └── SingleNote.js │ └── store.js └── yarn.lock ├── images ├── allnotes.png ├── create.png ├── edit.png ├── landing.png ├── login.png └── profile.png ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | node_modules/ 3 | /frontend/node_modules/ 4 | .env -------------------------------------------------------------------------------- /ProcFile: -------------------------------------------------------------------------------- 1 | web: node backend/server.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Note Zipper 2 | 3 | 4 | 7 | 8 |
5 | Note Zipper provides you one safe place for all your notes. 6 |
9 | 10 | # ![Note Zipper](https://github.com/Piyush55dude/notezipper/blob/master/images/landing.png) 11 | 12 | ## [Click Here to Watch Full tutorial on Youtube](https://www.youtube.com/watch?v=IQXjO0t4XRM&list=PLKhlp2qtUcSYC7EffnHzD-Ws2xG-j3aYo) 13 | ![MERN 1](https://user-images.githubusercontent.com/51760520/124705210-ea67ab00-df12-11eb-88cd-e9060c2942b9.png) 14 | 15 | ## Demo 16 | Here is a working live demo : https://notezipper.herokuapp.com/ 17 | 18 | ## Site 19 | 20 | ### Landing Page 21 | 22 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/landing.png) 23 | 24 | ### Login Form 25 | You can register a new account or login with an existing one. 26 | 27 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/login.png) 28 | 29 | ### Edit Profile 30 | 31 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/profile.png) 32 | 33 | ### Create a Note 34 | 35 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/create.png) 36 | 37 | ### All Notes 38 | 39 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/allnotes.png) 40 | 41 | ### Edit Note 42 | 43 | ![](https://github.com/Piyush55dude/notezipper/blob/master/images/edit.png) 44 | 45 | ## Built with 46 | 47 | - [React JS](https://reactjs.org/) 48 | - [Node JS](https://nodejs.org/) 49 | - [Express JS](https://expressjs.com/) 50 | - [Mongo DB](https://www.mongodb.com/) 51 | - [Bootstrap](http://getbootstrap.com/) 52 | 53 | ## Team 54 | 55 | [![Piyush Agarwal](https://avatars1.githubusercontent.com/u/51760520?v=3&s=144)](https://github.com/piyush-eon) 56 | 57 | MIT © [Piyush Agarwal ](https://github.com/piyush-eon) 58 | 59 | -------------------------------------------------------------------------------- /backend/config/db.js: -------------------------------------------------------------------------------- 1 | //Connection file to mongo db 2 | import mongoose from "mongoose"; 3 | import colors from "colors"; 4 | 5 | const connectDB = async () => { 6 | try { 7 | const conn = await mongoose.connect(process.env.MONGO_URI, { 8 | useUnifiedTopology: true, 9 | useNewUrlParser: true, 10 | useCreateIndex: true, 11 | }); 12 | console.log(`MongoDB Connected: ${conn.connection.host}`.cyan.underline); 13 | } catch (error) { 14 | console.error(`Error: ${error.message}`.red.bold); 15 | process.exit(); 16 | } 17 | }; 18 | 19 | export default connectDB; 20 | -------------------------------------------------------------------------------- /backend/controllers/noteController.js: -------------------------------------------------------------------------------- 1 | import Note from "../models/noteModel.js"; 2 | import asyncHandler from "express-async-handler"; 3 | 4 | // @desc Get logged in user notes 5 | // @route GET /api/notes 6 | // @access Private 7 | const getNotes = asyncHandler(async (req, res) => { 8 | const notes = await Note.find({ user: req.user._id }); 9 | res.json(notes); 10 | }); 11 | 12 | //@description Fetch single Note 13 | //@route GET /api/notes/:id 14 | //@access Public 15 | const getNoteById = asyncHandler(async (req, res) => { 16 | const note = await Note.findById(req.params.id); 17 | 18 | if (note) { 19 | res.json(note); 20 | } else { 21 | res.status(404).json({ message: "Note not found" }); 22 | } 23 | 24 | res.json(note); 25 | }); 26 | 27 | //@description Create single Note 28 | //@route GET /api/notes/create 29 | //@access Private 30 | const CreateNote = asyncHandler(async (req, res) => { 31 | const { title, content, category } = req.body; 32 | 33 | if (!title || !content || !category) { 34 | res.status(400); 35 | throw new Error("Please Fill all the feilds"); 36 | return; 37 | } else { 38 | const note = new Note({ user: req.user._id, title, content, category }); 39 | 40 | const createdNote = await note.save(); 41 | 42 | res.status(201).json(createdNote); 43 | } 44 | }); 45 | 46 | //@description Delete single Note 47 | //@route GET /api/notes/:id 48 | //@access Private 49 | const DeleteNote = asyncHandler(async (req, res) => { 50 | const note = await Note.findById(req.params.id); 51 | 52 | if (note.user.toString() !== req.user._id.toString()) { 53 | res.status(401); 54 | throw new Error("You can't perform this action"); 55 | } 56 | 57 | if (note) { 58 | await note.remove(); 59 | res.json({ message: "Note Removed" }); 60 | } else { 61 | res.status(404); 62 | throw new Error("Note not Found"); 63 | } 64 | }); 65 | 66 | // @desc Update a note 67 | // @route PUT /api/notes/:id 68 | // @access Private 69 | const UpdateNote = asyncHandler(async (req, res) => { 70 | const { title, content, category } = req.body; 71 | 72 | const note = await Note.findById(req.params.id); 73 | 74 | if (note.user.toString() !== req.user._id.toString()) { 75 | res.status(401); 76 | throw new Error("You can't perform this action"); 77 | } 78 | 79 | if (note) { 80 | note.title = title; 81 | note.content = content; 82 | note.category = category; 83 | 84 | const updatedNote = await note.save(); 85 | res.json(updatedNote); 86 | } else { 87 | res.status(404); 88 | throw new Error("Note not found"); 89 | } 90 | }); 91 | 92 | export { getNoteById, getNotes, CreateNote, DeleteNote, UpdateNote }; 93 | -------------------------------------------------------------------------------- /backend/controllers/userController.js: -------------------------------------------------------------------------------- 1 | import asyncHandler from "express-async-handler"; 2 | import User from "../models/userModel.js"; 3 | import generateToken from "../utils/generateToken.js"; 4 | 5 | //@description Auth the user 6 | //@route POST /api/users/login 7 | //@access Public 8 | const authUser = asyncHandler(async (req, res) => { 9 | const { email, password } = req.body; 10 | 11 | const user = await User.findOne({ email }); 12 | 13 | if (user && (await user.matchPassword(password))) { 14 | res.json({ 15 | _id: user._id, 16 | name: user.name, 17 | email: user.email, 18 | isAdmin: user.isAdmin, 19 | pic: user.pic, 20 | token: generateToken(user._id), 21 | }); 22 | } else { 23 | res.status(401); 24 | throw new Error("Invalid Email or Password"); 25 | } 26 | }); 27 | 28 | //@description Register new user 29 | //@route POST /api/users/ 30 | //@access Public 31 | const registerUser = asyncHandler(async (req, res) => { 32 | const { name, email, password, pic } = req.body; 33 | 34 | const userExists = await User.findOne({ email }); 35 | 36 | if (userExists) { 37 | res.status(404); 38 | throw new Error("User already exists"); 39 | } 40 | 41 | const user = await User.create({ 42 | name, 43 | email, 44 | password, 45 | pic, 46 | }); 47 | 48 | if (user) { 49 | res.status(201).json({ 50 | _id: user._id, 51 | name: user.name, 52 | email: user.email, 53 | isAdmin: user.isAdmin, 54 | pic: user.pic, 55 | token: generateToken(user._id), 56 | }); 57 | } else { 58 | res.status(400); 59 | throw new Error("User not found"); 60 | } 61 | }); 62 | 63 | // @desc GET user profile 64 | // @route GET /api/users/profile 65 | // @access Private 66 | const updateUserProfile = asyncHandler(async (req, res) => { 67 | const user = await User.findById(req.user._id); 68 | 69 | if (user) { 70 | user.name = req.body.name || user.name; 71 | user.email = req.body.email || user.email; 72 | user.pic = req.body.pic || user.pic; 73 | if (req.body.password) { 74 | user.password = req.body.password; 75 | } 76 | 77 | const updatedUser = await user.save(); 78 | 79 | res.json({ 80 | _id: updatedUser._id, 81 | name: updatedUser.name, 82 | email: updatedUser.email, 83 | pic: updatedUser.pic, 84 | isAdmin: updatedUser.isAdmin, 85 | token: generateToken(updatedUser._id), 86 | }); 87 | } else { 88 | res.status(404); 89 | throw new Error("User Not Found"); 90 | } 91 | }); 92 | 93 | export { authUser, updateUserProfile, registerUser }; 94 | -------------------------------------------------------------------------------- /backend/data/notes.js: -------------------------------------------------------------------------------- 1 | const notes = [ 2 | { 3 | _id: "1", 4 | title: "Day 1 of college", 5 | content: 6 | "I made a few new friends and introduced myself to a lot of new teachers.", 7 | category: "College", 8 | }, 9 | { 10 | _id: "2", 11 | title: "Learned some Node JS", 12 | content: "Learned how to create a server in node JS and my first API", 13 | category: "Learning", 14 | }, 15 | { 16 | _id: "3", 17 | title: "Watched some Anime", 18 | content: "Finished 2 seasons of Attack on Titan and My Hero academia.", 19 | category: "Entertainment", 20 | }, 21 | { 22 | _id: 4, 23 | title: "Started React JS", 24 | content: 25 | "Made my first App in React JS, feels awesome to learn something new. I aim to be a full stack dev someday", 26 | category: "Learning", 27 | }, 28 | ]; 29 | 30 | module.exports = notes; 31 | -------------------------------------------------------------------------------- /backend/middleware/authMiddleware.js: -------------------------------------------------------------------------------- 1 | import jwt from "jsonwebtoken"; 2 | import User from "../models/userModel.js"; 3 | import asyncHandler from "express-async-handler"; 4 | 5 | const protect = asyncHandler(async (req, res, next) => { 6 | let token; 7 | 8 | if ( 9 | req.headers.authorization && 10 | req.headers.authorization.startsWith("Bearer") 11 | ) { 12 | try { 13 | token = req.headers.authorization.split(" ")[1]; 14 | 15 | //decodes token id 16 | const decoded = jwt.verify(token, process.env.JWT_SECRET); 17 | 18 | req.user = await User.findById(decoded.id).select("-password"); 19 | 20 | next(); 21 | } catch (error) { 22 | res.status(401); 23 | throw new Error("Not authorized, token failed"); 24 | } 25 | } 26 | 27 | if (!token) { 28 | res.status(401); 29 | throw new Error("Not authorized, no token"); 30 | } 31 | }); 32 | 33 | export { protect }; 34 | -------------------------------------------------------------------------------- /backend/middleware/errorMiddleware.js: -------------------------------------------------------------------------------- 1 | const notFound = (req, res, next) => { 2 | const error = new Error(`Not Found - ${req.originalUrl}`); 3 | res.status(404); 4 | next(error); 5 | }; 6 | 7 | const errorHandler = (err, req, res, next) => { 8 | const statusCode = res.statusCode === 200 ? 500 : res.statusCode; 9 | res.status(statusCode); 10 | res.json({ 11 | message: err.message, 12 | stack: process.env.NODE_ENV === "production" ? null : err.stack, 13 | }); 14 | }; 15 | 16 | export { notFound, errorHandler }; 17 | -------------------------------------------------------------------------------- /backend/models/noteModel.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const noteSchema = mongoose.Schema( 4 | { 5 | title: { 6 | type: String, 7 | required: true, 8 | }, 9 | content: { 10 | type: String, 11 | required: true, 12 | }, 13 | category: { 14 | type: String, 15 | required: true, 16 | }, 17 | user: { 18 | type: mongoose.Schema.Types.ObjectId, 19 | required: true, 20 | ref: "User", 21 | }, 22 | }, 23 | { 24 | timestamps: true, 25 | } 26 | ); 27 | 28 | const Note = mongoose.model("Note", noteSchema); 29 | 30 | export default Note; 31 | -------------------------------------------------------------------------------- /backend/models/userModel.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import bcrypt from "bcryptjs"; 3 | 4 | const userSchema = mongoose.Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | email: { 11 | type: String, 12 | required: true, 13 | unique: true, 14 | }, 15 | password: { 16 | type: String, 17 | required: true, 18 | }, 19 | isAdmin: { 20 | type: Boolean, 21 | required: true, 22 | default: false, 23 | }, 24 | pic: { 25 | type: String, 26 | required: true, 27 | default: 28 | "https://icon-library.com/images/anonymous-avatar-icon/anonymous-avatar-icon-25.jpg", 29 | }, 30 | }, 31 | { 32 | timestamps: true, 33 | } 34 | ); 35 | 36 | userSchema.methods.matchPassword = async function (enteredPassword) { 37 | return await bcrypt.compare(enteredPassword, this.password); 38 | }; 39 | 40 | // will encrypt password everytime its saved 41 | userSchema.pre("save", async function (next) { 42 | if (!this.isModified("password")) { 43 | next(); 44 | } 45 | const salt = await bcrypt.genSalt(10); 46 | this.password = await bcrypt.hash(this.password, salt); 47 | }); 48 | 49 | const User = mongoose.model("User", userSchema); 50 | 51 | export default User; 52 | -------------------------------------------------------------------------------- /backend/routes/noteRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { 3 | getNoteById, 4 | getNotes, 5 | CreateNote, 6 | DeleteNote, 7 | UpdateNote, 8 | } from "../controllers/noteController.js"; 9 | const router = express.Router(); 10 | import { protect } from "../middleware/authMiddleware.js"; 11 | 12 | router.route("/").get(protect, getNotes); 13 | router 14 | .route("/:id") 15 | .get(getNoteById) 16 | .delete(protect, DeleteNote) 17 | .put(protect, UpdateNote); 18 | router.route("/create").post(protect, CreateNote); 19 | 20 | export default router; 21 | -------------------------------------------------------------------------------- /backend/routes/userRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { 3 | authUser, 4 | registerUser, 5 | updateUserProfile, 6 | } from "../controllers/userController.js"; 7 | import { protect } from "../middleware/authMiddleware.js"; 8 | const router = express.Router(); 9 | 10 | router.route("/").post(registerUser); 11 | router.post("/login", authUser); 12 | router.route("/profile").post(protect, updateUserProfile); 13 | 14 | export default router; 15 | -------------------------------------------------------------------------------- /backend/seeder.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import dotenv from "dotenv"; 3 | import colors from "colors"; 4 | import users from "./data/users.js"; 5 | import notes from "./data/notes.js"; 6 | import User from "./models/userModel.js"; 7 | import Note from "./models/noteModel.js"; 8 | import connectDB from "./config/db.js"; 9 | 10 | dotenv.config(); 11 | 12 | connectDB(); 13 | 14 | const importData = async () => { 15 | try { 16 | await Note.deleteMany(); 17 | await User.deleteMany(); 18 | 19 | const createdUsers = await User.insertMany(users); 20 | 21 | const adminUser = createdUsers[0]._id; 22 | 23 | const sampleNotes = notes.map((note) => { 24 | return { ...note, user: adminUser }; 25 | }); 26 | 27 | await Note.insertMany(sampleNotes); 28 | 29 | console.log("Data Imported!".green.inverse); 30 | process.exit(); 31 | } catch (error) { 32 | console.error(`${error}`.red.inverse); 33 | process.exit(1); 34 | } 35 | }; 36 | 37 | const destroyData = async () => { 38 | try { 39 | await Note.deleteMany(); 40 | await User.deleteMany(); 41 | 42 | console.log("Data Destroyed!".red.inverse); 43 | process.exit(); 44 | } catch (error) { 45 | console.error(`${error}`.red.inverse); 46 | process.exit(1); 47 | } 48 | }; 49 | 50 | if (process.argv[2] === "-d") { 51 | destroyData(); 52 | } else { 53 | importData(); 54 | } 55 | -------------------------------------------------------------------------------- /backend/server.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import dotenv from "dotenv"; 3 | import connectDB from "./config/db.js"; 4 | import colors from "colors"; 5 | import path from "path"; 6 | 7 | import noteRoutes from "./routes/noteRoutes.js"; 8 | import userRoutes from "./routes/userRoutes.js"; 9 | import { errorHandler, notFound } from "./middleware/errorMiddleware.js"; 10 | 11 | dotenv.config(); 12 | 13 | connectDB(); 14 | 15 | const app = express(); // main thing 16 | 17 | app.use(express.json()); // to accept json data 18 | 19 | app.use("/api/notes", noteRoutes); 20 | app.use("/api/users", userRoutes); 21 | 22 | // --------------------------deployment------------------------------ 23 | const __dirname = path.resolve(); 24 | 25 | if (process.env.NODE_ENV === "production") { 26 | app.use(express.static(path.join(__dirname, "/frontend/build"))); 27 | 28 | app.get("*", (req, res) => 29 | res.sendFile(path.resolve(__dirname, "frontend", "build", "index.html")) 30 | ); 31 | } else { 32 | app.get("/", (req, res) => { 33 | res.send("API is running.."); 34 | }); 35 | } 36 | // --------------------------deployment------------------------------ 37 | 38 | // Error Handling middlewares 39 | app.use(notFound); 40 | app.use(errorHandler); 41 | 42 | const PORT = process.env.PORT || 5000; 43 | 44 | app.listen( 45 | PORT, 46 | console.log( 47 | `Server running in ${process.env.NODE_ENV} mode on port ${PORT}..`.yellow 48 | .bold 49 | ) 50 | ); 51 | -------------------------------------------------------------------------------- /backend/utils/generateToken.js: -------------------------------------------------------------------------------- 1 | import jwt from "jsonwebtoken"; 2 | 3 | const generateToken = (id) => { 4 | return jwt.sign({ id }, process.env.JWT_SECRET, { 5 | expiresIn: "30d", 6 | }); 7 | }; 8 | 9 | export default generateToken; 10 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn 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 | ### `yarn 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 | ### `yarn 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 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "proxy": "http://127.0.0.1:5000", 4 | "version": "0.1.0", 5 | "private": true, 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^5.11.4", 8 | "@testing-library/react": "^11.1.0", 9 | "@testing-library/user-event": "^12.1.10", 10 | "axios": "^0.21.0", 11 | "react": "^17.0.1", 12 | "react-bootstrap": "^1.4.0", 13 | "react-dom": "^17.0.1", 14 | "react-markdown": "^6.0.1", 15 | "react-redux": "^7.2.2", 16 | "react-router-dom": "^5.2.0", 17 | "react-scripts": "4.0.0", 18 | "redux": "^4.0.5", 19 | "redux-devtools-extension": "^2.13.8", 20 | "redux-thunk": "^2.3.0", 21 | "web-vitals": "^0.2.4" 22 | }, 23 | "scripts": { 24 | "start": "react-scripts start", 25 | "build": "react-scripts build", 26 | "test": "react-scripts test", 27 | "eject": "react-scripts eject" 28 | }, 29 | "eslintConfig": { 30 | "extends": [ 31 | "react-app", 32 | "react-app/jest" 33 | ] 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.2%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | Note Zipper 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/notezipper/02c46832a574d652c3f4a5166a291d704085e504/frontend/public/logo192.png -------------------------------------------------------------------------------- /frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/notezipper/02c46832a574d652c3f4a5166a291d704085e504/frontend/public/logo512.png -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/notezipper/02c46832a574d652c3f4a5166a291d704085e504/frontend/src/App.css -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | import { BrowserRouter as Router, Route } from "react-router-dom"; 3 | import Footer from "./components/Footer"; 4 | import Header from "./components/Header"; 5 | import LandingPage from "./screens/LandingPage/LandingPage"; 6 | import MyNotes from "./screens/MyNotes/MyNotes"; 7 | import SingleNote from "./screens/SingleNote/SingleNote"; 8 | import LoginScreen from "./screens/LoginScreen/LoginScreen"; 9 | import RegisterScreen from "./screens/RegisterScreen/RegisterScreen"; 10 | import CreateNote from "./screens/SingleNote/CreateNote"; 11 | import { useState } from "react"; 12 | import ProfileScreen from "./screens/ProfileScreen/ProfileScreen"; 13 | 14 | function App() { 15 | const [search, setSearch] = useState(""); 16 | 17 | return ( 18 | 19 |
setSearch(s)} /> 20 |
21 | 22 | 23 | 24 | ( 27 | 28 | )} 29 | /> 30 | 31 | ; 32 | 33 |
34 |