To view our current website click here
🕹️ 👻 👾 👻 🚫 🚧
Make sure to have:
- Git: version control for our project. Will track and save what you do. Required to copy (pull) and add (push) code to this repository.
git --versionDownload on macOS:
brew install gitDownload on Linux (Ubuntu):
sudo apt update
sudo apt install git- React: the frontend library that breaks up the code into components, allowing us to break the project up a lot easier.
React depends on Node.js and npm (Node Package Manager), which both are needed:
node -v
npm -vDownload on macOS:
brew install nodeDownload on Linux (Ubuntu):
sudo apt update
sudo apt install nodejs
sudo apt install npm- Vite: a build tool that helps the application run quickly and efficiently. It is part of the
npm, and does not needs to be downloaded.
Be sure to check if the installation is successful by loading up a new terminal and checking the version.
In a Vite React project, the dist folder is where the final production build of your application is generated. When you run:
npm run buildVite compiles, optimizes, and bundles your code, placing the output into the dist/ folder. This folder contains:
- Minified & bundled JavaScript (optimized for performance)
- Optimized static assets (CSS, images, fonts, etc.)
- An index.html file that serves as the entry point for your app
This folder is what you deploy to a hosting service (GitHub Pages). The dist folder is usually added to .gitignore since it's a generated artifact that doesn't need to be version-controlled.
Cloning a repository
Open up terminal (change to the directory you want to save to, or not) and type:
git clone https://github.com/paulcostanza/CSCI401--Rock-Paper-Scissors-DashOpen up project in the IDE of your choice.
Create a new branch (anything other than main):
git checkout -b whatever-you-want to call the branchWork on the code.
npm run devThis will open up the webpage in a browser that will update in real time with your code for testing and debugging
npm run build
npm run deployCheck the current status of what git has saved or not saved. This will show you what files have changed since you downloaded the current repo.
git statusgit add .The . represents all files. If you want to only commit specific files, you can list them individually.
This saves all the files and code you worked on. This is the last step before pushing to the repo.
git commit -m "whatever message you want to add to keep track of the commit"git push origin your-branch-nameOn GitHub, go to the repo and you will see an option to Compare & pull request. Follow that and describe your changes.
I (Paul) will be able to merge your code into the codebase!
When the repo owner (Paul) updates the main branch while you are working on your own branch, your local version gets out of sync! Do not worry, this is super common. Finish up your updates, just like what it says from To save work until Create a pull request (PR). Then:
git checkout maingit pull origin maingit checkout your-branch-namegit merge mainIf you get any conflicts do not worry, let me know and we will figure it out 😃
Conflicts: Git tells you which files have conflicts. Open those files, look for the conflict markers (<<<<<<, =======, >>>>>>), and manually fix them. Once they're fixed: bash Copy Edit git add . git commit -m "Resolved merge conflicts" Push your updated branch bash Copy Edit git push origin
High-level overview of what to do:
- Set up MongoDB
- Set up Express server
- Create a Schema for Users
- Create Routes for User Operations
- Connecting the Express Routes to the Server
- Update User Data
- Connect the Front-End
- Deploy
Need to look into security, especially with password field in database
- the project
How the backend talks to the browser
[Browser] ←→ [React App] ←→ [Axios] ←→ [Express Server] ←→ [MongoDB]
^ ^ ^ ^
npm run dev POST req node server.js Mongoose