Skip to content

Commit f70df84

Browse files
Merge pull request #3 from HackNCState/react-rewrite
Small update to codebase
2 parents f928ec3 + 531286b commit f70df84

173 files changed

Lines changed: 17132 additions & 5195 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: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,78 @@
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+
- Your Discord username in the Registration Google Sheet (so you can log in)
11+
12+
### 1. Tooling
13+
14+
1. Install [Firebase CLI](https://firebase.google.com/docs/cli#install_the_firebase_cli)
15+
2. Install Python 3.11 or higher
16+
3. Install Node.js
17+
4. Clone this repository
18+
19+
### 2. Configuration
20+
21+
1. Create a Python virtual environment:
22+
23+
```bash
24+
python -m venv .venv
25+
```
26+
27+
2. Activate the virtual environment:
28+
- On Windows:
29+
30+
```powershell
31+
.venv\Scripts\activate
32+
```
33+
34+
- On macOS/Linux:
35+
36+
```bash
37+
source .venv/bin/activate
38+
```
39+
40+
3. Install the required Python packages:
41+
42+
```bash
43+
pip install -r requirements.txt
44+
```
45+
46+
4. Install the required Node.js packages:
47+
48+
```bash
49+
npm install
50+
```
51+
52+
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`.
53+
54+
### 3. Running Locally
55+
56+
1. Run the backend emulator suite:
57+
58+
- On Windows:
59+
60+
```powershell
61+
$env:GOOGLE_APPLICATION_CREDENTIALS="$PWD\service-account.json"
62+
firebase emulators:start --project=hackncsu-today
63+
```
64+
65+
- On macOS/Linux:
66+
67+
```bash
68+
export GOOGLE_APPLICATION_CREDENTIALS="$PWD/service-account.json"
69+
firebase emulators:start --project=hackncsu-today
70+
```
71+
72+
2. Run the frontend:
73+
74+
```bash
75+
npm run dev
76+
```
77+
78+
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+
}

firebase.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"functions": [
3+
{
4+
"source": "functions",
5+
"codebase": "default",
6+
"ignore": [
7+
"venv",
8+
".git",
9+
"firebase-debug.log",
10+
"firebase-debug.*.log",
11+
"*.local"
12+
],
13+
"runtime": "python313"
14+
}
15+
],
16+
"emulators": {
17+
"auth": {
18+
"port": 9099
19+
},
20+
"functions": {
21+
"port": 5001
22+
},
23+
"firestore": {
24+
"port": 5500
25+
},
26+
"ui": {
27+
"enabled": true
28+
},
29+
"singleProjectMode": true,
30+
"hosting": {
31+
"port": 5000
32+
},
33+
"storage": {
34+
"port": 9199
35+
}
36+
},
37+
"firestore": {
38+
"database": "(default)",
39+
"location": "nam5",
40+
"rules": "firestore.rules",
41+
"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"
59+
}
60+
}

firebase/.gitignore

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

firebase/firestore.rules

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

0 commit comments

Comments
 (0)