Separate backend and frontend dependencies () by Bruception

* Add request validation to user endpoints

* Remove tag id log

* Remove verbs from endpoints

* Remove old code

* Remove uid

* Fix

* Remove name from URI

* Rename utils

* Fix

* Move prettier

* Update gulp file

* Add additional scripts

* Update package-lock

* Update contributing.md

Co-authored-by: Miodec <bartnikjack@gmail.com>
This commit is contained in:
Bruce Berrios 2022-02-08 14:33:41 -05:00 committed by GitHub
parent c4e62dddfb
commit 345740db5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
618 changed files with 120289 additions and 116865 deletions
CONTRIBUTING.md
backend
frontend
firebase.jsongulpfile.jspackage-lock.jsonpackage.json
src/js

View file

@ -34,7 +34,7 @@ Git is optional but we recommend you utilize it. Monkeytype uses the Git source
#### NodeJS and NPM
To install NodeJS, navigate to the NodeJS [website](https://nodejs.org/en/) and download the `14.18.1 LTS`.
To install NodeJS, navigate to the NodeJS [website](https://nodejs.org/en/) and download the `16.13.2 LTS`.
Alternatively, if you use `nvm` then you can run `nvm install` and `nvm use` (you might need to specify the exact version) to use the version of Node.js in the `.nvmrc` file (if you use Windows, use [nvm-windows](https://github.com/coreybutler/nvm-windows)).
@ -49,7 +49,7 @@ Alternatively, if you use `nvm` then you can run `nvm install` and `nvm use` (yo
1. Run `npm install -g firebase-tools` to install the Firebase Command Line Interface.
1. Run `firebase login` on your terminal to log in to the same google account you just used to create the project.
1. Git clone this project.
1. Duplicate `.firebaserc_example`, rename the new file to `.firebaserc` and change the project name of default to the firebase project id you just created.
1. Within the frontend directory, duplicate `.firebaserc_example`, rename the new file to `.firebaserc` and change the project name of default to the firebase project id you just created.
- If `.firebaserc_example` does not exist after cloning, create your own with:
@ -92,8 +92,8 @@ Follow these steps if you want to work on anything involving the database/accoun
Once you have completed the above steps, you are ready to build and run Monkeytype.
1. Run `npm install` in the project root directory to install dependencies.
1. Run `npm run start:dev` (`npm run start:dev:nodb` if you skipped the mongo section) to start a local dev server on [port 5000](http://localhost:5000). It will watch for changes and rebuild when you edit files in `src/` or `public/` directories. Note that rebuilding doesn't happen instantaneously so be patient for changes to appear. Use <kbd>Ctrl+C</kbd> to kill it.
1. Run `npm install` in the project root/backend/frontend directories to install all dependencies.
2. Run `npm run start:dev` (`npm run start:dev:fe` if you skipped the mongo section) to start a local dev server on [port 5000](http://localhost:5000). It will watch for changes and rebuild when you edit files in `src/` or `public/` directories. Note that rebuilding doesn't happen instantaneously so be patient for changes to appear. Use <kbd>Ctrl+C</kbd> to kill it.
**Mac Users:** If you get 403 Forbidden errors while trying to access the local server, go into System Preferences > Sharing and disable AirPlay Receiver - it also runs on port 5000 and takes priority, causing 403 errors.

6101
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

33
backend/package.json Normal file
View file

@ -0,0 +1,33 @@
{
"name": "monkeytype-backend",
"version": "1.0.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
"start:dev": "nodemon --watch ./ ./server.js"
},
"engines": {
"node": "16.13.2",
"npm": "8.1.2"
},
"dependencies": {
"cors": "2.8.5",
"cron": "1.8.2",
"dotenv": "10.0.0",
"express": "4.17.1",
"express-rate-limit": "5.3.0",
"firebase-admin": "9.11.0",
"helmet": "4.6.0",
"joi": "17.6.0",
"lodash": "4.17.21",
"mongodb": "3.6.9",
"node-fetch": "2.6.7",
"node-object-hash": "2.3.10",
"nodemon": "2.0.7",
"path": "0.12.7",
"simple-git": "2.45.1",
"string-similarity": "4.0.4",
"ua-parser-js": "0.7.28",
"uuid": "8.3.2"
}
}

View file

@ -14,7 +14,7 @@ const uglify = require("gulp-uglify");
const through2 = require("through2");
// sass.compiler = require("dart-sass");
let eslintConfig = ".eslintrc.json";
let eslintConfig = "../.eslintrc.json";
task("clean", function () {
return src(["./public/"], { allowEmpty: true }).pipe(vinylPaths(del));

19190
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

47
frontend/package.json Normal file
View file

@ -0,0 +1,47 @@
{
"name": "monkeytype-frontend",
"version": "1.0.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
"build": "npx gulp build",
"start:dev": "npm run build && concurrently --kill-others \"npx gulp watch\" \"firebase serve --only hosting\"",
"deploy:live": "npm run build && firebase deploy -P live --only hosting"
},
"engines": {
"npm": "8.1.2"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"babel-eslint": "^10.1.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"dart-sass": "^1.25.0",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-eslint": "^6.0.0",
"gulp-eslint-new": "^1.3.0",
"gulp-sass": "^5.0.0",
"gulp-uglify": "^3.0.2",
"through2": "^4.0.2",
"vinyl-buffer": "^1.0.1",
"vinyl-paths": "^3.0.1",
"vinyl-source-stream": "^2.0.0"
},
"dependencies": {
"@babel/runtime": "^7.12.5",
"axios": "^0.21.2",
"chart.js": "^2.9.4",
"chartjs-plugin-annotation": "^0.5.7",
"chartjs-plugin-trendline": "^0.2.2",
"dom-to-image": "^2.6.0",
"gulp-replace": "^1.1.3",
"howler": "^2.2.1",
"moment-timezone": "^0.5.33",
"node-object-hash": "2.3.10",
"tinycolor2": "^1.4.2"
}
}

Some files were not shown because too many files have changed in this diff Show more