Skip to content

Commit 0c38e8b

Browse files
chore: update misc stuff (#296)
1 parent 6aa1260 commit 0c38e8b

21 files changed

+72
-128
lines changed

.env.template

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ PGCA=
1818

1919
# For secret message
2020
DUCKDUCKGOOSE=
21+
22+
# For API Requests
2123
NUXT_PUBLIC_API_BASE_URL=
2224

2325
# For Discord OAuth API
@@ -45,6 +47,5 @@ NODEMAILER_PASS=
4547
# For Discord Webhook Integration
4648
DISCORD_ANNOUNCEMENT_WEBHOOK=
4749

48-
4950
# For Con4 API
5051
CON4_API_KEY=

CONTRIBUTING.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
# Contributing to Logestic
1+
# Contributing to IC Hack '25
22

3-
## Reporting Issues
4-
5-
😥 Use the Issues tab to write what is wrong/required in the project.
6-
7-
## Solving Issues
8-
9-
1. ❗ All PRs must reference an issue.
10-
2. 🗣 If there is an issue you want to work on, ask on the issue thread if you want to work on it.
11-
3. 🍴 Fork this repository and create a new branch `pr-[number]/[short description]` according to the issue.
12-
4. ✍ Fix the issue.
13-
5. 🎆 Open a PR and wait until a moderator merges it in.
3+
You'll know what you have to do.

README.md

+8-19
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ This is the first time IC Hack tech systems will have extensive documentation. E
3737
3838
## Development rules
3939

40-
### Working on issues
41-
42-
We use ClickUp to keep track of the progress of the project. To pick up an issue:
43-
44-
1. Assign yourself in any card from the "Backlog". This should automatically put your card under "Pending".
45-
1. Alternatively, create an issue and add yourself as the asignee and place it in the "Pending" list.
46-
1. Then [create a branch](#creating-a-branch) and [open a draft pr](#creating-a-pr).
47-
1. Once the PR is approved and merged, move the card to "Completed".
48-
4940
### Creating a branch
5041

5142
No person can directly on the main branch. Hence you need to create a new branch to introduce any changes to the codebase.
@@ -58,18 +49,9 @@ No person can directly on the main branch. Hence you need to create a new branch
5849
You should create a PR **as soon as** you create a branch.
5950

6051
1. If the PR is not ready, create a _Draft_ PR. This is so that others know what is being worked on and can provide some feedback before you are knee deep into the feature.
61-
1. The actual commit messages within your PR **does not follow** any conventional naming pattern. However, your PR title must follow `type: description` format, similar to your branch name.
52+
1. The actual commit messages within your PR **does not follow** any conventional naming pattern. However, your PR title must follow `type(scope): description` format, similar to your branch name.
6253
1. If any of the repo admins approve your PR and you need to need to update your branch, consider rebase to avoid making another commit for the admins to review again.
6354

64-
#### PR <> ClickUp Integration
65-
66-
1. When you create a comment, in the description include the following text: `Link CU-86bzr6uwe`, you will find your taskId in the ClickUp Card you are working.
67-
1. You can use special commit messages to change the status of your card. E.g. a commit message can be, `updated the readme #86bzr6uwe[in review]`.
68-
1. Use `#<taskId>[in progress]` to move your card into "In Progress".
69-
1. Use `#<taskId>[in review]` to move your card into "In Review".
70-
1. Use `#<taskId>[blocked]` to move your card into "Blocked".
71-
1. When merging, your commit description should include `#<taskId>[completed]` to move your card into "Completed".
72-
7355
## Our Team
7456

7557
### IC Hack '25
@@ -83,6 +65,13 @@ You should create a PR **as soon as** you create a branch.
8365

8466
- [@Harini-Sritharar](https://github.com/Harini-Sritharar)
8567
- [@JoshXL23 | Joshua Gonsalves](https://github.com/JoshXL23)
68+
- [@georgedecesare](https://github.com/georgedecesare)
69+
70+
#### Additional Credits
71+
72+
- [@Who23 | Aditya Shrivastava](https://github.com/Who23) for registration scripts and users admin page
73+
- [@Saim-Khan1](https://github.com/Saim-Khan1) for implementing "Add to Google/Apple wallet" feature
74+
- [@invisi-splat | Bowen Zhu](https://github.com/invisi-splat) for working on hackspaces code.
8675

8776
## License
8877

docs/concepts/repository-pattern.md

-5
This file was deleted.

docs/concepts/serverless-computing.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Serverless Computing
2+
3+
::: warning
4+
this page is yet to finish
5+
:::

docs/concepts/sse.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Server Sent Events
22

3-
::: warn
4-
this page is yet to finish
3+
::: warning
4+
IC Hack '25 never got to using this.
55
:::

docs/concepts/third-party-cookies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Third Party Cookies
22

3-
::: warn
3+
::: warning
44
this page is yet to finish
55
:::

docs/directory-structure/server/modules/announcement.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ authors:
55
- George Decesare
66
---
77

8+
# Announcement
9+
810
The schema is quite simple. It is a table of announcements where each announcement has some information. The `pinUntil` field are those announcements which need to be scheduled at the top before the others **if and only if** the current datetime is before the datetime mentioned in `pinUntil`.
911

1012
| Field | Type | Description |

docs/directory-structure/server/modules/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Every sub-directory inside the `server/` directory is considered a **module**. A module _in this project_ contains their routes and possibly a schema.
44
These modules are _pluggable_ in the server code. In `src/app.ts`, you can import the module and route it with the `.route(url, app)` function by Hono.
55

6-
## Modules
6+
---
77

88
These certain modules are considered `core` since they the bare bones of what makes IC Hack. There is no special folder these but it is logical to lay them flat because _technically, then can be installed/uninstalled at will_.
99

docs/directory-structure/server/routes.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Routes
22

3+
::: warning
4+
Formatting required for this page. See the src markdown file for now.
5+
:::
6+
37
## Announcements (/annoucement)
48

59
GET /sse --> SSE to get all annoucements. "authenticated"

docs/directory-structure/subdomain-routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Subdomain Routing
22

33
::: info
4-
This is now deprecated
4+
This was deprecated by [PR#163](https://github.com/icdocsoc/ichack/pull/163)
55
:::
66

77
The application runs in the Server-side rendering (SSR) mode. This means the HTML document is rendered on the server, and sent to the browser. The JavaScript files soon follow along and the JavaScript code then renders it again on the client side, giving the page the interactivity.

docs/getting-started/environment-variables.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ order: 3
66

77
Copy the `.env.template` file to `.env.local` and `.env.test` and fill in the values with the correct information. Ask the admins for credentials for staging and prod environemnts. Read [Bun's docs](https://bun.sh/docs/runtime/env) to understand the naming convention and how to force using one env file.
88

9+
::: warning
10+
This page is not up to date
11+
:::
12+
913
## Dev setup (`.env.local`)
1014

1115
```bash

docs/getting-started/macos-issue.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
order: 5
2+
order: 6
33
---
44

55
# MacOS Issue

docs/getting-started/post-mortems.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
order: 5
3+
---
4+
5+
# Post Mortems
6+
7+
This page is a retrospective of everything that went well and wrong with the project.
8+
9+
## IC Hack '25
10+
11+
Nishant had a vision of the website and it become true. Well, 90% true but it was a massive achievement by the entire tech team and additional contributors. The codebase has been built to last with well-thought out design choices, placement of code, directory structure, code hygiene etc.
12+
13+
> The project was incomplete but it worked like fully-functioning well-oiled machine.
14+
15+
It was incomplete in the sense we were very time crunched that the last few commits leading upto the final deployment were shitty. But there were no tech problems at all. All raised issues during the event were human errors.
16+
1. The Admin UI doesn't work on mobile, the Team's UI doesn't work on Mobile. The Dashboard had problems with components overflowing and not enough time to debug it.
17+
2. There was no live-updates from the server hence we had to use 5-10 second polling.
18+
3. We noticed a small issue where the main app would run out of memory and crash itself every 4 hours. This is a suspected memory leak in the application. An update in [Bun v1.2.2](https://bun.sh/blog/bun-v1.2.2#javascript-uses-10-30-less-memory-at-idle) suggests that there were memory issues in previous versions. This is still untested, so the exact source of the memory leak is not yet found. However, this periodic crash didn't effect any user. The system booted back up within minutes.
19+
4. Some design choices were bad and some code hygiene started dropping a couple days before the event. There are plans to start refactoring them a few weeks before IC Hack'26 official development.
20+
21+
The Postgres instance was running normally however it may be a good idea to look into daily database backups upto the event and N-hourly backups during the event. We hope that future builds of the repository does not have to grind until the last moment. This repo, as it stands today, is built and designed to last
22+
23+
Bun started to become a bit of a pain in the ass. It is promising with an extremely fast execution and build time with great in-built features. However, since it is still new and immature, random errors kept coming up; nothing too bad to stop development for a long time. There were some dependency issues with Nuxt and Bun; however that was simply Nishant's error, corrected in [PR#184](https://github.com/icdocsoc/ichack/pull/184)
24+
25+
A couple of ideas we missed we:
26+
1. Make the profile scanning at registration increment a counter. There was no way of telling which user had entered our premises from the volunteer app. We had to use the `qr` table to check how many hackers are in the event - which is not accurate since hackers don't link their QR codes immediately.
27+
2. QR codes should contain a link instead of plain-text UUID. This way, hackers don't have to visit the website to scan their wristband (they are welcome to if needed). The volunteer app can simply extract the UUID from the url with the in-website camera to make the requests.
28+
3. A whitelist and blacklist tag for wristband UUIDs. This is not a big problem since we have a physical restraint on the scanning it (eg volunteers are instructed not to scan a qr code not on the person's wrist, or scan any picture, etc). It is never a bad idea to be extra safe.
29+
4. On the technical side of things, a table for meals/event check-ins/etc should be present. This table is a read access to hackers and exclusive write/read access to gods/admin/volunteers. Semantically, it makes sense to segregate this from the `profiles` table which is write/read access by the hackers.
30+
5. `POST /auth/create` is kind of a BS route. We never implemented this feature in the admin UI. A script to directly target the database is fine and less cumbersome.

docs/getting-started/project-timeline.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ The initial development started in **July 2024** with the Hono server. Minor ref
1010

1111
## Second Architecture
1212

13-
Around **November 2024**, the codebase was completely refactored ([PR#54](https://github.com/icdocsoc/ichack/pull/54)) to support the serverless architecture of [Digital Ocean App Platform](../technologies/digital-ocean). The first architecture was a bit of a pain configuring the environment variables and on-boarding new users. This simplified the repository greatly and easier to deploy and manage.
13+
Around **November 2024**, the codebase was completely refactored ([PR#43](https://github.com/icdocsoc/ichack/pull/43)) to support the [serverless architecture](../concepts/serverless-computing) of [Digital Ocean App Platform](../technologies/digital-ocean). The first architecture was a bit of a pain configuring the environment variables and on-boarding new users. This simplified the repository greatly and easier to deploy and manage.
1414

1515
As a result, we end up with the `website` application that is a single Nuxt4 application. This was connected to the Hono server with the `serverHandlers` property of `NuxtConfig`. The application smartly filtered pages and re-routed requests from `admin.ichack.org` and `my.ichack.org` accordingly from server middlewares and custom page routing defined in `apps/router.options.ts`.
1616

1717
The other application was `landing` that existed as a layer. We leveraged the fact that a Nuxt layer can be a stand-alone application. This app was statically generated and the files were uploaded to [Cloudflare Pages](../technologies/cloudflare) via [GitHub Actions](../technologies/github-actions).
1818

1919
`admin` and `my` remained as layers connected to the parent application for separation concerns. These layers extended `common` for the API requests they perform and `ui25` for the common UI components. As earlier, `admin` used [Nuxt UI v2](../technologies/nuxt-ui) and continued to do so.
2020

21+
Soon, we realised we were building something great and massive. We renamed the repository from ichack25 to simply ichack ([PR#54](https://github.com/icdocsoc/ichack/pull/54)) for future years to build upon this for many years to come. :tada:
22+
2123
### Nuxt 3 --> Nuxt 4
2224

2325
We decided to migrate the application to use Nuxt 4 instead. It was a bit of a migration to do so. This resulted a change in the Directory Structure.

docs/getting-started/running-the-project.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ order: 2
88

99
This is not an exhaustive list.
1010

11-
- [Bun](../tech-stack/bun) v1.1.18
11+
- [Bun](../tech-stack/bun) v1.1.44
1212
- Node v22.2.0
1313
- [Docker](../technologies/docker) v26.1.3
1414
- [PostreSQL](../tech-stack/postgresql) v16.3
@@ -30,7 +30,7 @@ Execute `bun install` in the route directory.
3030

3131
### Setup the Database
3232

33-
1. If the schema has been updated and your local instance of postgres is not synced with it, you can reset this by executing `bun reset-db`.
33+
1. If the schema has been updated and your local instance of postgres is not synced with it, you can reset this by executing `bun backend:push-schema`.
3434
2. Seed the database with some predefined entries by executing `bun run scripts/seed.ts` while the database is running. This file contains the email and password to login as a `god`.
3535

3636
### Environment Variables

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ features:
2121
- title: Backend in Hono
2222
details: Hono is a modern library for building REST servers.
2323
icon:
24-
src: https://hono.dev/images/logo-small.png
24+
src: https://hono.dev/images/logo.svg
2525
- title: Monorepo with all the tools needed
2626
details: Includes the landing page, internal page, admin page, backend server.
2727
icon: 🔧

docs/tech-stack/nuxt.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Follow the [Nuxt](https://nuxt.com) documentation [here](https://nuxt.com/docs/getting-started/introduction).
44

5-
Nuxt is a great Vue-based meta-framework to build full stack applications. It comes with a built-in [Nitro server](https://nitro.unjs.io/) (which we largely ignore because of the lack of features and poor documentation, we use Hono instead). Nuxt's documentation, however, was good and now it's even better; so have a thorough read of it (including some complex stuff like [Layers](https://nuxt.com/docs/getting-started/layers) and [configuration](https://nuxt.com/docs/api/nuxt-config)). Here, we are going to touch upon rendering modes:
5+
Nuxt is a great Vue-based meta-framework to build full stack applications. It comes with a built-in [Nitro server](https://nitro.unjs.io/) (which we largely ignore because of the lack of features and poor documentation, we use Hono instead). Nuxt's documentation, however, was good and now it's even better; so have a thorough read of it (including some complex stuff like [Layers](https://nuxt.com/docs/getting-started/layers) and [configuration](https://nuxt.com/docs/api/nuxt-config)).
66

77
::: warning
88
If you ever see an error like *"Hydration mismatch"* on your console, **DO NOT IGNORE IT AND AIM TO FIX IT ASAP!!**
@@ -23,7 +23,7 @@ Nishant and Jay worked with Nuxt 3 for IC Hack '24 and this made total sense to
2323
Nuxt 4 is practically out at this time of writing. However, it is in beta build right now and we don't wish to experiment, especially since we were experimenting with the backend. Additionally, Nuxt 4 is not very different than Nuxt 3, apart from a few breaking changes. So it doesn't matter much anyway.
2424

2525
::: info
26-
With the [2nd architecture PR](../getting-started/project-timeline), we have migrated to Nuxt4.
26+
With the [2nd architecture PR](../getting-started/project-timeline), we migrated to Nuxt4.
2727
:::
2828

2929
## Bad things about Nuxt.

docs/technologies/digital-ocean.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ This is a full [Cloud VM](../concepts/cloud-vm).
88

99
## Digital Ocean App Platform.
1010

11-
This is their self-managed serverless provider.
11+
This is their self-managed [serverless](../concepts/serverless-computing) provider.

scripts/migrate.ts

-4
This file was deleted.

scripts/printWinners.ts

-74
This file was deleted.

0 commit comments

Comments
 (0)