Skip to content

Commit

Permalink
start v2 rewrite
Browse files Browse the repository at this point in the history
Makes the following changes:
- Create fresh packages for app and dashboard.
- Remove Firebase-specific files and packages.
- Switch to Bun.
- Update package versions.
  • Loading branch information
max-niederman committed Oct 2, 2023
1 parent 122a2eb commit 77a4d25
Show file tree
Hide file tree
Showing 99 changed files with 863 additions and 504 deletions.
3 changes: 0 additions & 3 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export NIXPKGS_ALLOW_UNFREE=1
export NIXPKGS_ALLOW_INSECURE=1 # for node 16

use nix
layout node
63 changes: 9 additions & 54 deletions .github/workflows/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
push:
paths:
- "app/**"
- "schema/**"
- "pnpm-lock.yaml"
- "bun.lockb"
- ".github/workflows/app.yaml"

jobs:
Expand All @@ -19,36 +18,14 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v3

- name: Setup | Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Setup | Install PNPM
id: pnpm-install
with:
version: 8

- name: Setup | Locate PNPM Store
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup | Cache PNPM Store
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup | Install Bun
uses: oven-sh/setup-bun@v1

- name: Setup | Install Dependencies
run: pnpm install
run: bun install

- name: Build | Vite Build
run: pnpm run build
run: bun run build
working-directory: app

- name: Upload | Web
Expand Down Expand Up @@ -78,33 +55,11 @@ jobs:
java-version: "17"
cache: "gradle"

- name: Setup | Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Setup | Install PNPM
id: pnpm-install
with:
version: 8

- name: Setup | Locate PNPM Store
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup | Cache PNPM Store
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup | Install Bun
uses: oven-sh/setup-bun@v1

- name: Setup | Install Dependencies
run: pnpm install
run: bun install

- name: Setup | Download Web Distribution
uses: actions/download-artifact@v2
Expand All @@ -113,7 +68,7 @@ jobs:
path: app/dist

- name: Build | Capacitor Sync
run: npx cap sync android
run: bunx cap sync android
working-directory: app

- name: Build | Assemble APK
Expand Down
30 changes: 4 additions & 26 deletions .github/workflows/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
paths:
- "dashboard/**"
- "pnpm-lock.yaml"
- "bun.lockb"
- ".github/workflows/dashboard.yaml"

jobs:
Expand All @@ -19,35 +19,13 @@ jobs:
uses: actions/checkout@v3

- name: Setup | Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Setup | Install PNPM
id: pnpm-install
with:
version: 8

- name: Setup | Locate PNPM Store
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup | Cache PNPM Store
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
uses: oven-sh/setup-bun@v1

- name: Setup | Install Dependencies
run: pnpm install
run: bun install

- name: Build | Vite Build
run: pnpm run build
run: bun run build
working-directory: dashboard

- name: Upload | Web
Expand Down
32 changes: 5 additions & 27 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
paths:
- "website/**"
- "pnpm-lock.yaml"
- "bun.lockb"
- ".github/workflows/website.yaml"

jobs:
Expand All @@ -18,36 +18,14 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v3

- name: Setup | Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Setup | Install PNPM
id: pnpm-install
with:
version: 8

- name: Setup | Locate PNPM Store
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup | Cache PNPM Store
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup | Install Bun
uses: oven-sh/setup-bun@v1

- name: Setup | Install Dependencies
run: pnpm install
run: bun install

- name: Build | Astro Build
run: pnpm run build
run: bun run build
working-directory: website

- name: Upload | Web
Expand Down
2 changes: 1 addition & 1 deletion app/android/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions app/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
//apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'

plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
apply plugin: 'com.android.application'

android {

namespace 'school.holly.app'
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "school.holly.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 4
versionName "1.3"
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down Expand Up @@ -47,9 +39,6 @@ dependencies {
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')

implementation platform('com.google.firebase:firebase-bom:31.1.1')
implementation 'com.google.firebase:firebase-analytics'
}

apply from: 'capacitor.build.gradle'
Expand Down
2 changes: 1 addition & 1 deletion app/android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-firebase-authentication')


}

Expand Down
5 changes: 3 additions & 2 deletions app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="school.holly.app">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package school.holly.app;

import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
Loading

0 comments on commit 77a4d25

Please sign in to comment.