Skip to content
liambernPublic

About

A shared calendar, plans and groceries for two

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Together ♥

A private app for two: Diana's work shifts, days we lock in together, plans, and a shared grocery list. It includes Android home-screen widgets.

  • Website (React + Vite) on GitHub Pages: open it in any browser.
  • Android app (Capacitor): shows the same website, plus two widgets.
  • Server: Supabase (free). Both phones see changes almost instantly.
  • Updates: pushing to main updates the website, and the app loads the website, so the app updates too with no reinstall. A new APK is built only when the Android part changes, and Obtainium installs it.
  • No accounts: one phone creates a couple code, and the other types it in once.

Pages

Page What it does
Home Day counter, next day together, Diana today and tomorrow, this week, upcoming plans, groceries
Diana Month calendar. Pick a shift type and tap days to fill them in. Tap a filled day again to change its times or add a note
Together Week by week. Tap a day to cycle 🔒 together → 💭 maybe → clear. "Copy to next week" repeats a week
Plans Dates, trips, events, ideas and to-dos, with optional date, time and place
Groceries Shared list. Tick items off, clear the cart, and tap a remembered item to add it again
Settings Names, the "together since" date, week start, shift types, invite code

Widgets:

  • Together · next day: countdown to your next day together, plus Diana's shift today and tomorrow.
  • Together · groceries: what's still on the list.

Tap a widget to open the app on that page.

Google Calendar (one-way)

⚙️ Settings → Google Calendar gives two private calendar links:

  • Diana's work: her shifts, for her own Google account.
  • Days together + plans: for both accounts.

Google Calendar subscribes to them, so anything added, edited or deleted in the app shows up there too. Events keep a stable ID, so changes update in place. Google refreshes subscribed calendars every few hours, so it isn't instant. Editing in Google Calendar doesn't change the app. Needs supabase/calendar.sql run once.


One-time setup

1. GitHub (hosting and APK builds)

  1. Create an empty public repository, for example together, and push this code to it. It's public so GitHub Pages and Obtainium work for free. The repo holds only code. Your data lives in Supabase, protected by your couple code.
  2. Go to repo Settings → Pages → Build and deployment → Source: "GitHub Actions".
  3. Go to the Actions tab. "Website" deploys to https://<user>.github.io/<repo>/. Run "Android app" → Run workflow once to build the first APK.

2. Supabase (the shared database)

  1. Sign up at https://supabase.com (you can sign in with GitHub) and choose New project. Pick the region closest to you and any password.
  2. Open SQL Editor → New query, paste all of supabase/schema.sql, and click Run.
  3. Under Project Settings → API, copy the Project URL and the publishable / anon key. These two are meant to be public.
  4. Put them in src/config.js and push. Alternatively, set repo variables SUPABASE_URL and SUPABASE_KEY under Settings → Secrets and variables → Actions → Variables. If you leave them empty, the app asks for them on first launch.

Free Supabase projects pause after about a week with no activity at all. Daily use keeps it awake, and if it does pause, click "Restore" in the dashboard.

3. Phones

  1. On the first phone, open the website, enter your name, and tap Create our space. Then use Share invite to send the code to your partner.
  2. On the second phone, open the invite link, or the website and enter the code.
  3. To install the app, install Obtainium (https://github.com/ImranR98/Obtainium/releases, the app-…-release.apk). In Obtainium, tap Add app, paste https://github.com/<user>/<repo>, and install. Android will ask to allow installs from Obtainium. Allow it once.
  4. In the app, enter your name and code again. The app has its own storage separate from Chrome, so this is needed once.
  5. To add widgets, long-press the home screen, choose Widgets, then Together.

How updates work

You change… What happens
Pages, features, design (src/) Push, and about a minute later both phones have it. No reinstall
Widgets or native Android code (android/) Push. A new APK release is built, and Obtainium shows "Update available"

Development

npm install
npm run dev          # http://localhost:5173. Choose "Just try it" for a local demo without a server
npm run build

Android build on your own machine (needs Android Studio / SDK):

npm run build
node scripts/set-app-url.mjs https://<user>.github.io/<repo>/
npx cap sync android
cd android && ./gradlew assembleRelease

Data model

Everything is stored in one table, entries (id, couple, kind, data jsonb, created_by, …). kind is one of shift, together, plan, grocery or settings. Row-level security only returns rows whose couple matches the x-couple header the app sends.

New features usually need no database change: add a new kind and a page for it.

Signing key

android/app/together-release.jks signs the APK, so every build is installable as an update over the last one. It's committed so the setup works with no extra steps. To use a private key instead, add the repo secrets KEYSTORE_BASE64, KEYSTORE_PASSWORD, KEY_ALIAS and KEY_PASSWORD. Switching keys means uninstalling and reinstalling the app once.

About

A shared calendar, plans and groceries for two

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages