Skip to content

jschuur/coworking.party

Repository files navigation

Coworking Party

Have fun getting stuff done.

https://coworking.party

Very much a work in progress. Post your bugs and ideas to the issues and check out the current priorities. Contributions welcome. Especially a logo.

API

Currently, you can post a status update via the API with at least one of a free text 'update' field (up to 200 characters) or a 'status' option from the userSelectableStatusOptions list of options plus your 'apiKey'.

Make a POST request to https://coworking-party-party.jschuur.partykit.dev/party/main/status with a raw JSON body like this:

{
    "apiKey": "YOUR API KEY HERE",
    "update": "Playing Helldivers 2!",
    "status": "gaming"
}

Until the API key is exposed on the site under your profile settings, track down Joost and ask him for yours (seems safe, right?).

Local Development

If you're looking to contribute or just want to try running this locally, here's a quick setup guide:

  1. Clone the repo and install the dependencies. Note that some of the scripts in package.json have explicit references to pnpm that you may wish to adjust if you use a different package manager.
  2. Create a .env file in the root of the project based on the .env.example file and adjust the secrets as needed.
  3. Create a free Turso account, install the CLI, run turso auth login and initialise the local database with pnpm run db:migrate. Local development uses a local Turso dev instance. The DATABASE_URL secret already points to http://127.0.0.1:8080 (no auth token needed for local dev).
  4. PartyKit should not require an account for local development, but create a new partykit.json file in the root of the project based on partykit.example.json.
  5. Create a Twitch app and Discord app and define the respective AUTH_ secrets in the .env file. You could use just one and modify the providers in src/authConfigEdge.ts accordingly. Also add a random AUTH_SECRET.
  6. Configure the OAuth callback URLs for the Twitch and Discord apps to point to http://localhost:3000/api/auth/callback/twitch and http://localhost:3000/api/auth/callback/discord respectively on their dev portals.

Configuring additional third party services (Posthog, Google Analytics, Sentry, Discord webhook URL etc) is optional. The app will run gracefully without them.

Running Coworking Party Locally

SST Ion is used to deploy the app to AWS. The default pnpm run dev script also uses SST for live mode during local development, which would require a configured AWS account and the 3.0 sst CLI installed.

For local development, you can skip SST and needing an AWS account by running pnpm run dev-nosst instead. This launches Next.js with the regular next dev command, along with all the other local services (Turso, PartyKit, etc).

The local Next.js app will be at http://localhost:3000/, a local Drizzle Studio instance to manage the database at https://local.drizzle.studio/ and the PartyKit instance at port 1999. This means you can hit http://localhost:1999/party/main/debug e.g. to see the PartyKit debug endpoint.

Join the #dev channel on the Discord or start an issue for further help.

Thanks

Big thanks to The Claw for the inspiration and being early adopters. Cool 'party' name via Andreas and Matty. First PR: tdrayson, additional contributions from DR-DinoMight.

Tech Stack

Next.js, Tailwind CSS, PartyKit, Auth.js, Drizzle, SST (Ion), AWS, Turso, Shadcn UI and more.

Links

- Joost Schuur (Threads, Twitter)


About

Virtual coworking communities to keep people motivated and have a little fun.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages