96-100 - 10k planner
96 - Setup project
Livestream
97 - Setup database & API endpoint
Livestream
Problems found:
- Cannot setup multiple db providers in Prisma anymore (sqlite in dev, postgres in prod)
- [ ] Change to Cockroachdb on both dev & prod
#98 - Setup CockroachDB
Livestream
- Start Single-node cluster for development https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker-linux#start-a-single-node-cluster
Docker method
docker volume create roach-single
docker network create -d bridge roachnet
docker run -d \
--rm \
--env COCKROACH_DATABASE=tenthousand_planner \
--env COCKROACH_USER=roach \
--env COCKROACH_PASSWORD=password \
--name=roach-single \
--hostname=roach-single \
# --net=roachnet \
-p 26257:26257 \
-p 8080:8080 \
-v "roach-single:/cockroach/cockroach-data" \
cockroachdb/cockroach:v23.1.8 start-single-node \
--http-addr=localhost:8080 \
--insecure
- Check logs
docker exec -it roach-single grep 'node starting' /cockroach/cockroach-data/logs/cockroach.log -A 11
- Connect
docker exec -it roach-single ./cockroach sql --url="postgresql://root@roach-single:26257/defaultdb" --insecure
- Stop (with 5 min grace period)
docker stop -t 300 roach-single
(however it does not work, so I tried using Homebrew instead)
brew install cockroachdb/tap/cockroach
cockroach start-single-node --insecure --store=/tmp/cockroach-data # --background
99
Livestream
- Add autocomplete component
- Set API cache to 60s using
setHeaders
100
Livestream
- Add overall stats page
- Add Google Analytics
- Add fly transitions on cards