Skip to content

Commit

Permalink
[fix] some Development environment bugs
Browse files Browse the repository at this point in the history
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Dec 3, 2023
1 parent 2b3f241 commit dd3268a
Show file tree
Hide file tree
Showing 8 changed files with 936 additions and 603 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Docker meta
id: docker_meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}

- name: Deploy to Vercel
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- init: pnpm install && pnpm run build
command: pnpm run start
- init: pnpm i && pnpm build
command: pnpm dev
78 changes: 41 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# Open Hackathon - Web App

Open-source Hackathon Platform with Git-based Cloud Development Environment
Open-source [Hackathon][1] Platform with **Git-based Cloud Development Environment**

[![CI & CD](https://github.com/kaiyuanshe/OpenHackathon-Web/actions/workflows/main.yml/badge.svg)][8]
[![CI & CD](https://github.com/kaiyuanshe/OpenHackathon-Web/actions/workflows/main.yml/badge.svg)][2]

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)][3]
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][4]

## Key links

- [Task kanban](https://github.com/orgs/kaiyuanshe/projects/4?fullscreen=true)
- [Task kanban](https://github.com/orgs/kaiyuanshe/projects/9/)
- [UI design](https://www.figma.com/file/HKPV8IB4kxrAVAuuSBZKd1/Open-Hackathon)
- Web entry
- testing: https://open-hackathon.vercel.app/
- production: https://hackathon.kaiyuanshe.cn/
- RESTful API
- testing: https://hackathon-api-test.kaiyuanshe.cn/swagger/
- production: https://hackathon-api.kaiyuanshe.cn/swagger/
- production: https://hackathon-server.kaiyuanshe.cn/documentation/

## Technology stack

- Language: [TypeScript v5][2]
- Component engine: [Nextjs v14][3]
- Component suite: [Bootstrap v5][4]
- State management: [MobX v6][6]
- PWA framework: [Workbox v6][5]
- CI / CD: GitHub [Actions][11] + [Vercel][12]
- Language: [TypeScript v5][5]
- Component engine: [Nextjs v14][6]
- Component suite: [Bootstrap v5][7]
- State management: [MobX v6][8]
- PWA framework: [Workbox v6][9]
- CI / CD: GitHub [Actions][10] + [Vercel][11]

## Getting Started

Expand All @@ -41,39 +43,41 @@ Open http://localhost:3000 with your browser to see the result.

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

[API routes][13] can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in `pages/api/hello.ts`.
[API routes][12] can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes][13] instead of React pages.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes][12] instead of React pages.

## Learn More

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

- [Next.js Documentation][14] - learn about Next.js features and API.
- [Learn Next.js][15] - an interactive Next.js tutorial.
- [Next.js Documentation][13] - learn about Next.js features and API.
- [Learn Next.js][14] - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository][16] - your feedback and contributions are welcome!
You can check out [the Next.js GitHub repository][15] - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform][12] from the creators of Next.js.

Check out our [Next.js deployment documentation][17] for more details.

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkaiyuanshe%2FOpenHackathon-Web.svg?type=large)][18]

[1]: https://react.dev/
[2]: https://www.typescriptlang.org/
[3]: https://nextjs.org/
[4]: https://getbootstrap.com/
[5]: https://developers.google.com/web/tools/workbox
[6]: https://github.com/mobxjs/mobx/tree/mobx4and5/docs
[8]: https://github.com/kaiyuanshe/OpenHackathon-Web/actions/workflows/main.yml
[11]: https://github.com/features/actions
[12]: https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme
[13]: https://nextjs.org/docs/api-routes/introduction
[14]: https://nextjs.org/docs
[15]: https://nextjs.org/learn
[16]: https://github.com/vercel/next.js/
[17]: https://nextjs.org/docs/deployment
[18]: https://app.fossa.com/projects/git%2Bgithub.com%2Fkaiyuanshe%2FOpenHackathon-Web?ref=badge_large
The easiest way to deploy your Next.js app is to use the [Vercel Platform][11] from the creators of Next.js.

Check out our [Next.js deployment documentation][16] for more details.

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkaiyuanshe%2FOpenHackathon-Web.svg?type=large)][17]

[1]: https://en.wikipedia.org/wiki/Hackathon
[2]: https://github.com/kaiyuanshe/OpenHackathon-Web/actions/workflows/main.yml
[3]: https://codespaces.new/kaiyuanshe/OpenHackathon-Web
[4]: https://gitpod.io/?autostart=true#https://github.com/kaiyuanshe/OpenHackathon-Web
[5]: https://www.typescriptlang.org/
[6]: https://nextjs.org/
[7]: https://getbootstrap.com/
[8]: https://mobx.js.org/
[9]: https://developers.google.com/web/tools/workbox
[10]: https://github.com/features/actions
[11]: https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme
[12]: https://nextjs.org/docs/api-routes/introduction
[13]: https://nextjs.org/docs
[14]: https://nextjs.org/learn
[15]: https://github.com/vercel/next.js/
[16]: https://nextjs.org/docs/deployment
[17]: https://app.fossa.com/projects/git%2Bgithub.com%2Fkaiyuanshe%2FOpenHackathon-Web?ref=badge_large
6 changes: 3 additions & 3 deletions next.config.js → next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const withLess = require('next-with-less'),
setPWA = require('next-pwa');
import withLess from 'next-with-less';
import setPWA from 'next-pwa';

const { NODE_ENV, CI } = process.env;

Expand All @@ -11,7 +11,7 @@ const withPWA = setPWA({
});

/** @type {import('next').NextConfig} */
module.exports = {
export default {
...withPWA(withLess({ reactStrictMode: true })),
...(CI ? { output: 'standalone' } : {}),
};
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@
},
"dependencies": {
"@authing/native-js-ui-components": "^3.1.31",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-brands-svg-icons": "^6.5.1",
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@giscus/react": "^2.3.0",
"array-unique-proposal": "^0.3.4",
"classnames": "^2.3.2",
"echarts-jsx": "^0.5.4",
"idea-react": "^1.0.0-rc.30",
"koajax": "^0.9.4",
"koajax": "^0.9.6",
"leaflet": "^1.9.4",
"leaflet.chinatmsproviders": "^3.0.6",
"lodash": "^4.17.21",
"mobx": "~6.10.2",
"mobx-i18n": "^0.4.2",
"mobx-react": "~9.0.1",
"mobx-react": "~9.0.2",
"mobx-react-helper": "^0.2.7",
"mobx-restful": "^0.6.12",
"mobx-restful-table": "^1.2.2",
"next": "^14.0.2",
"next": "^14.0.3",
"next-ssr-middleware": "^0.6.1",
"open-react-map": "^0.7.0",
"react": "^18.2.0",
Expand All @@ -39,15 +39,16 @@
"web-utility": "^4.1.3"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@octokit/openapi-types": "^19.0.2",
"@babel/core": "^7.23.5",
"@octokit/openapi-types": "^19.1.0",
"@types/leaflet": "^1.9.8",
"@types/lodash": "^4.14.201",
"@types/node": "^18.18.9",
"@types/react": "^18.2.37",
"eslint": "^8.53.0",
"eslint-config-next": "^14.0.2",
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.1",
"@types/react": "^18.2.41",
"eslint": "^8.55.0",
"eslint-config-next": "^14.0.3",
"eslint-plugin-simple-import-sort": "^10.0.0",
"get-git-folder": "^0.1.2",
"husky": "^8.0.3",
"less": "^4.2.0",
"less-loader": "^11.1.3",
Expand All @@ -56,7 +57,7 @@
"next-with-less": "^3.0.1",
"prettier": "^3.1.0",
"ts-node": "^10.9.1",
"typescript": "~5.2.2",
"typescript": "~5.3.2",
"webpack": "^5.89.0"
},
"prettier": {
Expand Down
4 changes: 2 additions & 2 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default function Document() {

<link
rel="stylesheet"
href="https://unpkg.com/bootstrap@5.3.1/dist/css/bootstrap.min.css"
href="https://unpkg.com/bootstrap@5.3.2/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
href="https://unpkg.com/bootstrap-icons@1.10.5/font/bootstrap-icons.css"
href="https://unpkg.com/bootstrap-icons@1.11.1/font/bootstrap-icons.css"
/>
<link
rel="stylesheet"
Expand Down
Loading

1 comment on commit dd3268a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for open-hackathon ready!

✅ Preview
https://open-hackathon-fe58llasx-techquery.vercel.app

Built with commit dd3268a.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.