Skip to content

Commit

Permalink
✨ Add Android app
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Jun 18, 2024
1 parent 9660545 commit 7e9c146
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 94 deletions.
4 changes: 2 additions & 2 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"appId": "app.starfocus",
"appName": "Starfocus",
"bundledWebRuntime": false,
"webDir": "out",
"cordova": {},
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {}
"webDir": "out"
}
4 changes: 4 additions & 0 deletions app/home/page.tsx → app/[...all]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const App = dynamic(() => import('../../components/AppShell'), {
ssr: false,
})

export async function generateStaticParams() {
return [{ all: ['home'] }, { all: ['constellation'] }, { all: ['settings'] }]
}

export default function Page() {
return <App />
}
4 changes: 2 additions & 2 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const config: CapacitorConfig = {
appId: 'app.starfocus',
appName: 'Starfocus',
bundledWebRuntime: false,
webDir: 'out',
cordova: {},
plugins: {
SplashScreen: {
launchShowDuration: 0,
},
},
cordova: {},
webDir: 'out',
}

export default config
7 changes: 6 additions & 1 deletion components/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StatusBar, Style } from '@capacitor/status-bar'
import { IonReactRouter } from '@ionic/react-router'
import { Route } from 'react-router-dom'
import Home from './pages/Home'
import Constellation from './pages/Constellation'

setupIonicReact({})

Expand All @@ -23,7 +24,11 @@ const AppShell = () => {
<IonReactRouter>
<IonRouterOutlet id="main">
<Route
path="/"
path="/constellation"
render={() => <Constellation />}
/>
<Route
path="/home"
render={() => <Home />}
/>
</IonRouterOutlet>
Expand Down
9 changes: 9 additions & 0 deletions components/pages/Constellation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { IonPage } from '@ionic/react'

export default function Constellation() {
return (
<IonPage>
<h1>Constellation</h1>
</IonPage>
)
}
13 changes: 6 additions & 7 deletions components/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
import { OverlayEventDetail } from '@ionic/react/dist/types/components/react-component-lib/interfaces'
import { Todo, db } from '../db'
import { useLiveQuery } from 'dexie-react-hooks'
import { Link } from 'react-router-dom'

const Home = () => {
// const data = [
Expand Down Expand Up @@ -180,16 +181,13 @@ const Home = () => {
<>
<MiscMenu />
<FilterMenu />
<IonPage>
<IonPage id="main-content">
<IonHeader>
<IonToolbar>
<IonTitle>Today & upcoming</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent
className="ion-padding"
id="main-content"
>
<IonContent className="ion-padding">
<Log todos={logTodos} />
<Important todos={importantTodos} />
<Icebox todos={iceboxTodos} />
Expand Down Expand Up @@ -284,7 +282,7 @@ export const MiscMenu = () => {
>
<IonHeader>
<IonToolbar>
<IonTitle>Menu Content</IonTitle>
<IonTitle>Misc</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent className="ion-padding">
Expand All @@ -303,10 +301,11 @@ export const FilterMenu = () => {
>
<IonHeader>
<IonToolbar>
<IonTitle>Menu Content</IonTitle>
<IonTitle>Views</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent className="ion-padding">
<Link to="/constellation">Constellation</Link>
<p>Filters coming soon...</p>
</IonContent>
</IonMenu>
Expand Down
4 changes: 2 additions & 2 deletions ios/App/App/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"appId": "app.starfocus",
"appName": "Starfocus",
"bundledWebRuntime": false,
"webDir": "out",
"cordova": {},
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {},
"webDir": "out",
"packageClassList": [
"AppPlugin",
"HapticsPlugin",
Expand Down
160 changes: 80 additions & 80 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
{
"name": "starfocus",
"version": "0.0.1",
"description": "Todo app for the future",
"author": "",
"license": "BUSL-1.1",
"bugs": {
"url": "https://github.com/astrochoric/starfocus/issues"
},
"homepage": "https://starfocus.app",
"keywords": [
"todo",
"space",
"productivity",
"goals",
"future"
],
"scripts": {
"android:dev": "next build && cap sync && cap run android",
"build": "convex codegen --typecheck=disable && next build",
"convex:dev": "convex dev --typecheck=disable",
"convex:deploy": "convex deploy --typecheck=disable",
"next:dev": "next dev -p 6603",
"lint": "next lint",
"prepare": "husky install",
"prettier:fix": "prettier --write components/ interfaces/ pages/ public/ styles/ utils/",
"start": "next start",
"type-check": "tsc"
},
"dependencies": {
"@capacitor/android": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/core": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/keyboard": "^6.0.0",
"@capacitor/status-bar": "^6.0.0",
"@ionic/react": "7.7.4",
"@ionic/react-router": "7.7.4",
"classnames": "2.5.1",
"convex": "^1.11.3",
"debounce": "^1.2.1",
"dexie": "^4.0.4",
"dexie-react-hooks": "^1.1.7",
"next": "14.2.3",
"next-plausible": "^3.12.0",
"plausible-tracker": "^0.3.8",
"pouchdb-browser": "^8.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router": "5.3.4",
"react-router-dom": "5.3.4",
"react-virtuoso": "4.7.1"
},
"devDependencies": {
"@capacitor/cli": "^6.0.0",
"@types/jest": "29.5.12",
"@types/node": "20.11.25",
"@types/react": "18.2.64",
"@types/react-dom": "18.2.21",
"@types/react-router": "5.1.20",
"@types/react-router-dom": "5.3.3",
"@typescript-eslint/parser": "^7.8.0",
"autoprefixer": "10.4.18",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"gitmoji-cli": "^7.1.0",
"husky": "^8.0.0",
"ionicons": "7.2.2",
"postcss": "8.4.35",
"prettier": "3.2.5",
"prettier-plugin-tailwindcss": "^0.1.13",
"pullstate": "1.25",
"reselect": "5.1.0",
"tailwindcss": "3.4.1",
"typescript": "5.4.5"
},
"engines": {
"node": "20.x"
}
}
"name": "starfocus",
"version": "0.0.1",
"description": "Todo app for the future",
"author": "",
"license": "BUSL-1.1",
"bugs": {
"url": "https://github.com/astrochoric/starfocus/issues"
},
"homepage": "https://starfocus.app",
"keywords": [
"todo",
"space",
"productivity",
"goals",
"future"
],
"scripts": {
"android:dev": "next build && cap sync && mv out/home.html out/index.html && cap run android",
"build": "convex codegen --typecheck=disable && next build",
"convex:dev": "convex dev --typecheck=disable",
"convex:deploy": "convex deploy --typecheck=disable",
"next:dev": "next dev -p 6603",
"lint": "next lint",
"prepare": "husky install",
"prettier:fix": "prettier --write components/ interfaces/ pages/ public/ styles/ utils/",
"start": "next start",
"type-check": "tsc"
},
"dependencies": {
"@capacitor/android": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/core": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/keyboard": "^6.0.0",
"@capacitor/status-bar": "^6.0.0",
"@ionic/react": "7.7.4",
"@ionic/react-router": "7.7.4",
"classnames": "2.5.1",
"convex": "^1.11.3",
"debounce": "^1.2.1",
"dexie": "^4.0.4",
"dexie-react-hooks": "^1.1.7",
"next": "14.2.3",
"next-plausible": "^3.12.0",
"plausible-tracker": "^0.3.8",
"pouchdb-browser": "^8.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router": "5.3.4",
"react-router-dom": "5.3.4",
"react-virtuoso": "4.7.1"
},
"devDependencies": {
"@capacitor/cli": "^6.0.0",
"@types/jest": "29.5.12",
"@types/node": "20.11.25",
"@types/react": "18.2.64",
"@types/react-dom": "18.2.21",
"@types/react-router": "5.1.20",
"@types/react-router-dom": "5.3.3",
"@typescript-eslint/parser": "^7.8.0",
"autoprefixer": "10.4.18",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"gitmoji-cli": "^7.1.0",
"husky": "^8.0.0",
"ionicons": "7.2.2",
"postcss": "8.4.35",
"prettier": "3.2.5",
"prettier-plugin-tailwindcss": "^0.1.13",
"pullstate": "1.25",
"reselect": "5.1.0",
"tailwindcss": "3.4.1",
"typescript": "5.4.5"
},
"engines": {
"node": "20.x"
}
}

0 comments on commit 7e9c146

Please sign in to comment.