Skip to content

Commit 09db3a2

Browse files
Merge pull request #21 from HackNCState/dev
Deploy dashboard
2 parents df881f8 + bee98dd commit 09db3a2

205 files changed

Lines changed: 21354 additions & 5215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy to Firebase Hosting on dev
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
jobs:
7+
build_and_deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v5
11+
- name: Set up Node.js
12+
uses: actions/setup-node@v5
13+
with:
14+
node-version: 'lts/*'
15+
cache: 'npm'
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Build with Vite
19+
run: npm run build
20+
- uses: FirebaseExtended/action-hosting-deploy@v0
21+
with:
22+
repoToken: ${{ secrets.GITHUB_TOKEN }}
23+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HACKNCSU_TODAY }}
24+
channelId: dev
25+
projectId: hackncsu-today
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- master
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v5
16+
with:
17+
node-version: 'lts/*'
18+
cache: 'npm'
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Build with Vite
22+
run: npm run build
23+
- uses: FirebaseExtended/action-hosting-deploy@v0
24+
with:
25+
repoToken: ${{ secrets.GITHUB_TOKEN }}
26+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HACKNCSU_TODAY }}
27+
channelId: live
28+
projectId: hackncsu-today

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
.firebase/*
27+
.venv
28+
service-account.json

README.md

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,90 @@
11
# hackncsu-today
22

3-
Comprehensive software suite to manage Hack_NCState. Currently under development.
3+
## Setup guide
4+
5+
i hope this all works if not let me know
6+
7+
### Prerequisites
8+
9+
- `service-account.json` file with access to the Google Sheets API (let me know if you need access)
10+
- `CLIENT_SECRET` value for Discord OAuth2 (let me know if you need this)
11+
- Your Discord username in the Registration Google Sheet (so you can log in)
12+
13+
### 1. Tooling
14+
15+
1. Install [Firebase CLI](https://firebase.google.com/docs/cli#install_the_firebase_cli)
16+
2. Install Python 3.11 or higher
17+
3. Install Node.js
18+
4. Clone this repository
19+
20+
### 2. Configuration
21+
22+
1. Create a Python virtual environment:
23+
24+
```bash
25+
python -m venv functions/venv
26+
```
27+
28+
2. Activate the virtual environment:
29+
- On Windows:
30+
31+
```powershell
32+
functions\venv\Scripts\activate
33+
```
34+
35+
- On macOS/Linux:
36+
37+
```bash
38+
source functions/venv/bin/activate
39+
```
40+
41+
3. Install the required Python packages:
42+
43+
```bash
44+
pip install -r functions/requirements.txt
45+
```
46+
47+
4. Install the required Node.js packages:
48+
49+
```bash
50+
npm install
51+
```
52+
53+
5. This isn't best practice but we're using a service account file to allow you to access the spreadsheet data locally. Let me know and I'll share the file with you. Place it in the root of the project as `service-account.json`.
54+
55+
6. You'll also need a file `functions/.env.local` with the following content:
56+
57+
```env
58+
CLIENT_SECRET=<???>
59+
```
60+
61+
Let me know and I'll share the client secret with you.
62+
63+
### 3. Running Locally
64+
65+
1. Run the backend emulator suite:
66+
67+
- On Windows:
68+
69+
```powershell
70+
$env:GOOGLE_APPLICATION_CREDENTIALS="$PWD\service-account.json"
71+
firebase emulators:start --project=hackncsu-today
72+
```
73+
74+
- On macOS/Linux:
75+
76+
```bash
77+
export GOOGLE_APPLICATION_CREDENTIALS="$PWD/service-account.json"
78+
firebase emulators:start --project=hackncsu-today
79+
```
80+
81+
The emulator will ask you to configure some parameters. I set defaults for these
82+
so you can just hit enter to accept them.
83+
84+
2. Run the frontend:
85+
86+
```bash
87+
npm run dev
88+
```
89+
90+
3. Open your browser and navigate to `http://localhost:8080` to see the application running locally.

biome.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false
10+
},
11+
"formatter": {
12+
"enabled": true,
13+
"indentStyle": "tab"
14+
},
15+
"linter": {
16+
"enabled": true,
17+
"rules": {
18+
"recommended": true
19+
}
20+
},
21+
"javascript": {
22+
"formatter": {
23+
"quoteStyle": "double"
24+
}
25+
},
26+
"assist": {
27+
"enabled": true,
28+
"actions": {
29+
"source": {
30+
"organizeImports": "on"
31+
}
32+
}
33+
}
34+
}

components.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/index.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
22+
}
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,35 @@
2626
"ui": {
2727
"enabled": true
2828
},
29-
"singleProjectMode": true
29+
"singleProjectMode": true,
30+
"hosting": {
31+
"port": 5000
32+
},
33+
"storage": {
34+
"port": 9199
35+
}
3036
},
3137
"firestore": {
3238
"database": "(default)",
3339
"location": "nam5",
3440
"rules": "firestore.rules",
3541
"indexes": "firestore.indexes.json"
42+
},
43+
"hosting": {
44+
"public": "dist",
45+
"ignore": [
46+
"firebase.json",
47+
"**/.*",
48+
"**/node_modules/**"
49+
],
50+
"rewrites": [
51+
{
52+
"source": "**",
53+
"destination": "/index.html"
54+
}
55+
]
56+
},
57+
"storage": {
58+
"rules": "storage.rules"
3659
}
3760
}

firebase/.gitignore

Lines changed: 0 additions & 72 deletions
This file was deleted.

firebase/.vscode.example/tasks.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)