GithubHelp home page GithubHelp logo

cc-app's Introduction

Court Canva

Getting Started ✨ ✨

Install dependencies

$ npm i

Start the server

$ npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/pages/index.tsx. The page auto-updates as you edit the file.

The src/pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Environment Variables

Add a file named .env at the root directory. Copy the .env code from Frontend ENV ticket on notion(Get notion access permission from the development group) and paste it in .env. You can refer to the .env.example file in the directory and repo.

Build for Deploy

$ npm run build
$ npm run export

Run the Production

$ npm run start

Run All Test

$ npm run test:ci

Run Single Test With Watching And Display Coverage

$ npm run test filename --watch --coverage

Project structure

$PROJECT_ROOT
│   # run some command when you commit
├── husky
│   # end-to-end testing
├── cypress
│   #icon
├── public
│
├── src
│   │   # all unit tests
│   ├── tests
│   │   # all images
│   ├── assets
│   │   # react component files
│   ├── components
│   │   # Page layout
│   ├── layouts
│   │   # Page files
│   ├── pages
│   │   # redux(store,reducer,action)
│   ├── store
│   │   # chakra config
│   ├── styles
│   │   # tools
│   ├── utils

Project Tech Stack

Front-end
• Node Version: v16.14
• Framework: Next.js (The React version we are using is 17)
• Scripting Language: Typescript
• 2D Canvas: Konva
• State-Management: Redux-toolkit
• Styling: Chakra-UI, Styled-component
• ApiClient: Axios
• Testing: Jest, React-testing-library
• React Hooks Testing Library
• Code Control: Eslint, Prettier
• Git Hook: Husky,commitlint, lint-staged
Recommended Plugins

Visual Studio Code Editor:

  • Code Spell Checker : A basic spell checker that works well with camelCase code.
  • Gitlens: GitLens simply helps you better understand code. Quickly glimpse into whom, why, and when a line or code block was changed.
  • Prettier: Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
  • vscode-icons(optional): Manage pull requests and conduct code reviews in your IDE with full source-tree context. Comment on any line, not just the diffs. Use jump-to-definition, your favorite keybindings, and code intelligence with more of your workflow.

Chrome Extensions

  • React Developer Tools : React Developer Tools is a Chrome DevTools extension for the open-source React JavaScript library. It allows you to inspect the React component hierarchies in the Chrome Developer Tools
  • Wappalyzer : Find out the technology stack of any website.

UI Design

Figma: Link

Notion Board

We put our ticket board and other important information in the notion board. Please advise our BA to get access to it.

Code of Conduct 📋

1. Creating New Branches
  • Warning:heavy_exclamation_mark::cop:: No one was allowed to manipulate main branch directly in any way and for any reason. When you get a new ticket and plan to start your work, please create a new branch then start coding. You can create a pull request to make your work able to be reviewed and tested by team and get your code merged after getting enough approvals.
  • Branch Name Example: "feature/cc-0027-a-user-can-view-pro-full-court"
  • Tutorial about branch management: Link
  • It is better to delete your branch after your pull request is approved and your branch have been merged into main branch.
2. Commit Message
# Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

feat: add hat wobble
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.

More Examples:

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

References:

3. Pull Request
  • Pull Request Title Example: "Feature/cc 0042 a user can log in sign up for my account"
  • Tutorial About How To Create A Pull Request: Link
  • 4. Specific Code Convention
  • Basically we will use double double quotes ""instead of single quotes'' in the front end project.
  • We use full names of the attributes for Css code like marginTop:30px instead of mt: 30px.
  • In terms of indentation, our indentation in the project is two spaces.
    How To Change Indentation in your VS code
  • Please format your code before submitting your work.
  • Frequent Issue Solutions:pill:

    If you find any issues which block you when your are working, please check this list or search on the Internet 🔍 to look for potential solutions. Don't worry if you cannot find it 😆 , just put your questions in the group chat and discuss with our team members and tutors. We will try our best to help you fix it 🎓 .

    Why cannot I start the server?
      1. Read the "Getting Started" section in this document again to make sure your input is correct.
      1. We are using "npm" to manage the packages. If you are using "yarn" instead, please install "npm" and use "npm" in this project.
      1. Please make sure you have the correct .env file in your root directory.
      1. Please make sure you have run "npm i" every time before you are trying to run the project especially after you have pulled others' work from other branches.
      1. Use node -v to check whether your node version is 16. If you are curious about how to have multiple versions in your computer, you may be interested about this 👉 Manage multiple node versions for Mac users:apple:
    Why cannot I commit my work?
    1. Please check whether you followed the correct work flow to commit your work.
      Git Guide About Commit
    1. Please make sure you have the correct .env file in your root directory.
    1. Please make sure you have solved all conflicts before you commit your work.
      How to resolve conflicts in Git
    1. Please make sure your commit message is in correct format. You can check the "Commit Message" section in this document or here.
    1. SWC issue: if you met exceptions about SWC when you are trying to commit your work especially you are using M1 MacBook, please check the following steps to fix it:

      1. Delete node_modules and package-lock.json. 2. Run npm i -f in your terminal. 3. Use the package-lock.json existing on the main branch which works perfectly fine to replace the package-lock.json in your directory. 4. Run npm run pre-commit to check if you have fixed it.

        </td>
      
  • Enjoy the journey!👏

    cc-app's People

    Contributors

    beryl-zhou avatar billwisebai avatar blackmesa-canteen avatar cecilia0109 avatar charles-xing avatar devharris7 avatar double-twelve avatar emilygong111 avatar evezzm avatar fuchih avatar githubeason avatar guanlinau avatar howard-cui avatar jennawan avatar jzeva avatar kaifeng-sun avatar ki-ki-316 avatar kritomomo avatar mason-yao avatar qiying417 avatar redre4per avatar stevenliu986 avatar stkwn avatar sty1997 avatar tatoma avatar wwwseven avatar xunli253 avatar xunlutas avatar zhihanchenzack avatar zhuocun avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    cc-app's Issues

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Rate-Limited

    These updates are currently rate-limited. Click on a checkbox below to force their creation now.

    • fix(deps): update dependency styled-components to v5.3.11 (styled-components, @types/styled-components)
    • chore(deps): update commitlint monorepo (@commitlint/cli, @commitlint/config-conventional)
    • chore(deps): update dependency @babel/plugin-proposal-decorators to v7.24.7
    • chore(deps): update dependency @svgr/webpack to v6.5.1
    • chore(deps): update dependency babel-plugin-styled-components to v2.1.4
    • chore(deps): update dependency cypress to v9.7.0
    • chore(deps): update dependency eslint to v8.57.0
    • chore(deps): update dependency eslint-config-next to v12.3.4
    • chore(deps): update dependency eslint-config-prettier to v8.10.0
    • chore(deps): update dependency eslint-plugin-jest to v26.9.0
    • chore(deps): update dependency eslint-plugin-react to v7.35.0
    • chore(deps): update dependency msw to v1.3.3
    • chore(deps): update dependency prettier to v2.8.8
    • chore(deps): update testing-library monorepo (@testing-library/dom, @testing-library/jest-dom)
    • chore(deps): update typescript-eslint monorepo to v5.62.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
    • fix(deps): update aws-sdk-js-v3 monorepo to v3.620.0 (@aws-sdk/client-cognito-identity, @aws-sdk/client-s3)
    • fix(deps): update dependency @react-oauth/google to ^0.12.0
    • fix(deps): update dependency @reduxjs/toolkit to v1.9.7
    • fix(deps): update dependency date-fns to v2.30.0
    • fix(deps): update dependency framer-motion to v6.5.1
    • fix(deps): update dependency konva to v8.4.3
    • fix(deps): update dependency next-react-svg to v1.2.0
    • fix(deps): update dependency react-icons to v4.12.0
    • fix(deps): update dependency react-redux to v8.1.3
    • fix(deps): update dependency redux-undo to v1.1.0
    • fix(deps): update emotion monorepo to v11.13.0 (@emotion/react, @emotion/styled)
    • chore(deps): update commitlint monorepo to v19 (major) (@commitlint/cli, @commitlint/config-conventional)
    • chore(deps): update dependency @svgr/webpack to v8
    • chore(deps): update dependency @types/node to v20
    • chore(deps): update dependency cypress to v13
    • chore(deps): update dependency eslint to v9
    • chore(deps): update dependency eslint-config-next to v14
    • chore(deps): update dependency eslint-config-prettier to v9
    • chore(deps): update dependency eslint-plugin-jest to v28
    • chore(deps): update dependency eslint-plugin-prettier to v5
    • chore(deps): update dependency husky to v9
    • chore(deps): update dependency jest to v29
    • chore(deps): update dependency msw to v2
    • chore(deps): update dependency prettier to v3
    • chore(deps): update dependency typescript to v5
    • chore(deps): update react monorepo to v18 (major) (@types/react, react, react-dom)
    • chore(deps): update testing-library monorepo (major) (@testing-library/dom, @testing-library/jest-dom, @testing-library/react, @testing-library/user-event)
    • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
    • fix(deps): update dependency @chakra-ui/react to v2
    • fix(deps): update dependency @reduxjs/toolkit to v2
    • fix(deps): update dependency date-fns to v3
    • fix(deps): update dependency framer-motion to v11
    • fix(deps): update dependency konva to v9
    • fix(deps): update dependency nanoid to v5
    • fix(deps): update dependency react-icons to v5
    • fix(deps): update dependency react-konva to v18
    • fix(deps): update dependency react-redux to v9
    • fix(deps): update dependency styled-components to v6
    • 🔐 Create all rate-limited PRs at once 🔐

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Ignored or Blocked

    These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

    Detected dependencies

    npm
    package.json
    • @aws-sdk/client-cognito-identity ^3.370.0
    • @aws-sdk/client-s3 ^3.374.0
    • @chakra-ui/react ^1.8.8
    • @emotion/react ^11
    • @emotion/styled ^11
    • @react-oauth/google ^0.2.6
    • @reduxjs/toolkit ^1.8.2
    • axios ^0.27.2
    • date-fns ^2.29.3
    • framer-motion ^6
    • html2canvas ^1.4.1
    • jspdf ^2.5.1
    • konva ^8.3.9
    • lodash ^4.17.21
    • nanoid ^4.0.0
    • next ^12.1.5
    • next-head-seo ^0.1.3
    • next-react-svg 1.1.3
    • react 17.0.2
    • react-dom 17.0.2
    • react-easy-crop ^5.0.0
    • react-icons ^4.3.1
    • react-konva ^17.0.2-6
    • react-redux ^8.0.1
    • react-responsive-carousel ^3.2.23
    • redux-undo ^1.0.1
    • styled-components ^5.3.5
    • @babel/plugin-proposal-decorators ^7.17.9
    • @commitlint/cli ^16.2.3
    • @commitlint/config-conventional ^16.2.1
    • @heroicons/react ^1.0.6
    • @svgr/webpack ^6.2.1
    • @testing-library/dom ^8.13.0
    • @testing-library/jest-dom ^5.16.4
    • @testing-library/react ^12.1.5
    • @testing-library/react-hooks ^8.0.1
    • @testing-library/user-event ^12.1.10
    • @types/lodash ^4.14.182
    • @types/node ^17.0.30
    • @types/react 17.0.11
    • @types/react-redux ^7.1.24
    • @types/styled-components ^5.1.25
    • @typescript-eslint/eslint-plugin ^5.15.0
    • @typescript-eslint/parser ^5.15.0
    • babel-plugin-styled-components ^2.0.7
    • cypress ^9.5.2
    • eslint ^8.11.0
    • eslint-config-google ^0.14.0
    • eslint-config-next 12.1.0
    • eslint-config-prettier ^8.5.0
    • eslint-plugin-jest ^26.1.5
    • eslint-plugin-prettier ^4.2.1
    • eslint-plugin-react ^7.29.4
    • husky ^7.0.4
    • jest ^27.5.1
    • msw ^1.2.1
    • prettier ^2.6.2
    • typescript 4.6.2
    • whatwg-fetch ^3.6.2

    • Check this box to trigger a request for Renovate to run again on this repository

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.