8000 GitHub - wakatime/crackboard.dev: Track your productivity through a daily leaderboard
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wakatime/crackboard.dev

Repository files navigation

crackedboard.dev

wakatime

Setup

Install Postgres.

git clone git@github.com:wakatime/crackboard.dev.git
cd crackboard.dev
psql -c "CREATE ROLE crackboarddev WITH LOGIN SUPERUSER PASSWORD 'crackboarddev';"
psql -c "CREATE DATABASE crackboarddev WITH OWNER crackboarddev;"
psql -d crackboarddev -c "CREATE EXTENSION citext;"
cp .env.example .env
pnpm i
pnpm migrate
pnpm dev
pnpm android
pnpm ios

Tech Stack

Adding npm dependencies

To add a package, first choose the workspace(s) where it's going to be used then install for a workspace with:

pnpm add <package> --filter=@workspace/web

Authentication

Auth is handled by logging in with WakaTime. Create a new WakaTime OAuth App:

WakaTime OAuth App Settings

Add your app’s App ID and App Secret to your local .env and your production app’s env vars:

.env

WAKATIME_APP_ID=1234
WAKATIME_APP_SECRET=waka_sec_123

Admin

To access the admin, make sure you’re the first sign up and you'll become the leaderboard’s admin. Then visit http://localhost:3000/admin.

Use production API for local mobile

Set the TEST_PROD flag to true in constants/index.ts to use the production api server.

Login on Dev Android Mobile Simulator

The Android simulator treats localhost as the simulator itself, so when logging in via GitHub just edit the localhost urls and replace with 10.0.2.2.

0