Skip to content

Commit

Permalink
Merge pull request #273 from thinc-org/beta
Browse files Browse the repository at this point in the history
Deploy to Production (28th Nov 2021)
  • Loading branch information
saenyakorn authored Nov 29, 2021
2 parents 11b3705 + c583a2c commit 22a92bb
Show file tree
Hide file tree
Showing 140 changed files with 2,762 additions and 8,557 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
},
overrides: [
{
files: ['src/pages/**/*.tsx', '**/*.stories*', '**/*.d.ts'],
files: ['src/pages/**/*.tsx', '**/*.d.ts'],
rules: {
'import/no-default-export': 0,
},
Expand Down
3 changes: 0 additions & 3 deletions .storybook/fsMock.js

This file was deleted.

23 changes: 0 additions & 23 deletions .storybook/main.js

This file was deleted.

36 changes: 0 additions & 36 deletions .storybook/preview-head.html

This file was deleted.

27 changes: 0 additions & 27 deletions .storybook/preview.js

This file was deleted.

87 changes: 67 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,81 @@
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).
![cover](https://user-images.githubusercontent.com/33742791/142388797-fa14bcfa-b01e-45ab-a271-bfdeeb26285f.png)

## Getting Started
<!--- insert badge here --->

First, run the development server:
Have no idea what courses to take? Don't know what this course is about? We got it covered. With [CU Get Reg](https://cugetreg.com), we put all kinds of course data together so that you don't have to.

```bash
npm run dev
# or
yarn dev
```
## Contents

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
- [The beginning of CU Get Reg](#beginning-of-cu-get-reg)
- [Related repositories](#related-repositories)
- [Contribution](#contribution)
- [Roadmap](#roadmap)
- [Contributors](#contributors)
- [Contacts](#contacts)
- [Sponsors](#sponsors)

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
<div id="beginning-of-cu-get-reg"></div>

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
## The beginning of CU Get Reg

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
"Which GenEd courses should I enroll this semester?"

## Learn More
"Will this course conflict with my other courses?"

To learn more about Next.js, take a look at the following resources:
"Each section of this course is taught on different days. How do I choose?"

- [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.
And many other problems students face when planning their timetable for the semester. We, the CU Get Reg team, are no different.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
Picking courses and sections in each semester is a very complicated and time-consuming process. Course information is scattered, especially GenEd courses. When trying to find the right GenEd, you have to consider many factors such as course contents, available seats, and popularity. However, that information is hard to access which makes planning very difficult.

## Deploy on Vercel
We saw this problem and built [CU Get Reg](https://cugetreg.com) to make this planning process a breeze!

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

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

- [cugetreg-frontend](https://github.com/thinc-org/cugetreg-frontend) The web interface, powered by React
- [cugetreg-backend](https://github.com/thinc-org/cugetreg-backend) The core API, powered by GraphQL and NestJS
- [cugetreg-scraper](https://github.com/thinc-org/cugetreg-scraper) The system that fetches public course data from [Reg Chula](https://cas.reg.chula.ac.th/cu/cs/QueryCourseScheduleNew/index.html)
- [chula-courses](https://github.com/thinc-org/chula-courses) Data schema

<div id="contribution"></div>

## Contribution

CU Get Reg is open source - we welcome all developers. If you want to be a part of CU Get Reg and improve Chulalongkorn University society, you can start here!

- [Contribution Guides](#https://github.com/thinc-org/cugetreg-frontend/wiki/Contribution-Guides)
- [Set up your local environments](https://github.com/thinc-org/cugetreg-frontend/wiki/Contribution-Guides)
- [Explore issues](https://github.com/thinc-org/cugetreg-frontend/issues)
- [Our Roadmap](https://github.com/thinc-org/cugetreg-frontend/wiki/Contribution-Guides)

<div id="roadmap"></div>

## Roadmap

Read more at [Roadmap](https://github.com/thinc-org/cugetreg-frontend/wiki/Contribution-Guides)

<div id="contributors"></div>

## Contributors

TODO

<div id="contacts"></div>

## Contacts

You can contact us anytime via

- Facebook Page: [Thinc.](https://www.facebook.com/ThailandIncubator)
- LinkedIn: [CU Get Reg](https://www.linkedin.com/company/cugetreg)
- Discord: Coming soon

<div id="sponsors"></div>

## Sponsors

1. [Office of the Registrar - Chulalongkorn University](https://www.reg.chula.ac.th) - provides the infrastructure for CU Get Reg
2. [General Education Center - Chulalongkorn University](https://www.gened.chula.ac.th) - provides course description for GenEd courses
3. [Gen อย่าได้ Ed](https://www.facebook.com/genedahs) - helps promote our website and provides data on GenEd courses
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module.exports = {
'<rootDir>/__mocks__/fileMock.js',
'^@/(.*)$': '<rootDir>/src/$1',
},
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.stories.tsx', '!src/**/styled.tsx'],
snapshotSerializers: ["enzyme-to-json/serializer"]
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/styled.tsx'],
snapshotSerializers: ['enzyme-to-json/serializer'],
}
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
"build": "next build",
"start": "next start",
"export": "yarn build && yarn next export",
"ci": "yarn && yarn export && yarn build-storybook && mv storybook-static out/storybook",
"storybook": "start-storybook -s ./public -p 6006",
"build-storybook": "build-storybook -s ./public",
"ci": "yarn && yarn export",
"size": "size-limit",
"postbuild": "next-sitemap"
},
"dependencies": {
"@apollo/client": "^3.4.x",
"@date-io/date-fns": "1.x",
"@emotion/react": "^11.1.5",
"@emotion/cache": "^11.5.0",
"@emotion/react": "^11.5.0",
"@emotion/server": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^5.0.0-alpha.32",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^5.0.0-alpha.32",
"@mui/icons-material": "^5.1.0",
"@mui/lab": "^5.0.0-alpha.54",
"@mui/material": "^5.1.0",
"@react-hook/google-optimize": "^1.2.1",
"@thinc-org/chula-courses": "^2.1.0",
"@thinc-org/chula-courses": "^2.3.0",
"@types/gapi": "^0.0.39",
"@types/gapi.client.drive": "^3.0.13",
"@types/lodash": "^4.14.170",
Expand Down Expand Up @@ -70,12 +70,6 @@
"@semantic-release/git": "^10.0.0",
"@semantic-release/github": "^8.0.1",
"@semantic-release/release-notes-generator": "^10.0.2",
"@storybook/addon-actions": "^6.1.15",
"@storybook/addon-essentials": "^6.1.15",
"@storybook/addon-jest": "^6.3.6",
"@storybook/addon-knobs": "^6.1.15",
"@storybook/addon-links": "^6.1.15",
"@storybook/react": "^6.1.15",
"@testing-library/dom": "^7.29.4",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.7",
Expand Down Expand Up @@ -108,7 +102,6 @@
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"semantic-release": "^18.0.0",
"storybook-addon-next-router": "^2.0.4",
"typescript": "^4.4.4"
},
"husky": {
Expand Down
9 changes: 6 additions & 3 deletions src/__mock__/courses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const mockCourseData: Course[] = [
credit: 3,
creditHours: 'LECT 3.0 CR(LECT 3.0 HR)',
courseCondition: '-',
courseDesc: null,
courseDescTh: null,
courseDescEn: null,
genEdType: 'IN',
midterm: null,
final: null,
Expand Down Expand Up @@ -57,7 +58,8 @@ export const mockCourseData: Course[] = [
credit: 3,
creditHours: 'LECT 1.0 CR + NL36 2.0 CR(LECT 1.0 HR + FWK 6.0 HR)',
courseCondition: '-',
courseDesc: null,
courseDescTh: null,
courseDescEn: null,
genEdType: 'IN',
midterm: null,
final: null,
Expand Down Expand Up @@ -167,7 +169,8 @@ export const mockCourseData: Course[] = [
credit: 3,
creditHours: 'LECT 1.0 CR + NL23 2.0 CR(LECT 1.0 HR + PRAC 4.0 HR)',
courseCondition: '-',
courseDesc: null,
courseDescTh: null,
courseDescEn: null,
genEdType: 'HU',
midterm: {
date: '2565-03-09T00:00:00.000Z',
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/BackButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos'
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'
import { useRouter } from 'next/router'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/BackButton/styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
import { Button, IconButton } from '@material-ui/core'
import { Button, IconButton } from '@mui/material'

export const ButtonMobile = styled(IconButton)`
border: 1px solid #2a2d48;
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Caption/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
import { Typography as MuiTypography } from '@material-ui/core'
import { Typography as MuiTypography } from '@mui/material'
import { PropsWithChildren } from 'react'

const Typography = styled(MuiTypography)`
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Chips/config.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChipProps } from '@material-ui/core'
import { ChipProps } from '@mui/material'
import { DayOfWeek, GenEdType } from '@thinc-org/chula-courses'

import { ChipFilledHighlightColor, ChipOutlinedHighlightColor } from '@/configs/theme/overrides/chip'
Expand Down
Loading

0 comments on commit 22a92bb

Please sign in to comment.