Skip to content

Commit

Permalink
Merge pull request #1 from Firebird1029/brandon
Browse files Browse the repository at this point in the history
add authentication functionality for MVP
  • Loading branch information
Firebird1029 authored Mar 16, 2024
2 parents 5dda041 + 13e1522 commit 3d8a98b
Show file tree
Hide file tree
Showing 38 changed files with 8,149 additions and 154 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["react"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/jsx-curly-brace-presence": "off",
"react/prop-types": "off",
"no-unused-vars": "warn",
"no-console": "warn",
"import/no-extraneous-dependencies": "off",
"no-plusplus": "off",
"import/extensions": "off",
"import/no-unresolved": "off"
},
"overrides": [
{
"files": ["route.js"],
"rules": {
"import/prefer-default-export": "off"
}
}
]
}
10 changes: 7 additions & 3 deletions .github/workflows/lint-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install modules
run: npm install
- name: Run Lint script
- name: Install frontend modules
run: npm ci
- name: Lint frontend
run: npm run lint
- name: Install backend modules
run: cd api && pip install -r requirements.txt && pip install pylint
- name: Lint backend
run: cd api && python -m pylint *.py
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[Github Actions] lint files"
149 changes: 26 additions & 123 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,133 +1,36 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# nyc test coverage
.nyc_output
# testing
/coverage

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# next.js
/.next/
/out/

# Bower dependency directory (https://bower.io/)
bower_components
# production
/build

# node-waf configuration
.lock-wscript
# misc
.DS_Store
*.pem

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/
jspm_packages/
# local env files
.env*.local

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# vercel
.vercel

# TypeScript cache
# typescript
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Custom
.DS_Store
next-env.d.ts
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# README

## Installation

To install the backend Python packages:

```bash
cd api && pip install -r requirements.txt && cd -
```

To install the frontend NPM packages:

```bash
npm install && cd -
```

## Backend

To run the local backend server:

```bash
cd api
flask --app server run --debug
```

To lint the backend code:

```bash
python -m pylint *.py
```

To access the local backend server:

```plaintext
http://127.0.0.1:5000/api/ping
```

## Frontend

To run the local frontend application:

```bash
npm run dev
```

To lint the frontend code:

```bash
npm run lint
```

To access the local frontend application:

```plaintext
localhost:3000
```

## Misc

To save a Python package to `backend/requirements.txt`, use `pigar`: `pip install pigar` then `pigar generate`.

## Next.js README

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

### Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

### Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

### Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Loading

0 comments on commit 3d8a98b

Please sign in to comment.