Skip to content

23f3001304/TypeReal-Mo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

TypeReal

A competitive, real-time typing app in the spirit of MonkeyType. Race the clock, race a ghost of your past runs, or duel another player live.

Monorepo layout

  • apps/web - Vite + React 18 + TypeScript front end
  • apps/api - Fastify + TypeScript back end with Prisma and Socket.io

Tech stack

Web: React 18, React Router 7, Vite, TypeScript, Framer Motion, GSAP, Lenis, Firebase, socket.io-client

API: Fastify, TypeScript, Prisma (PostgreSQL), Lucia auth with Arctic OAuth, Socket.io, web-push, Nodemailer, Firebase Admin, Zod

Getting started

Prerequisites: Node 20+ and a PostgreSQL database.

API

cd apps/api
npm install
cp .env.example .env   # then fill in the values
npm run db:generate
npm run db:push
npm run dev

Web

cd apps/web
npm install
# create a .env with the API URL and Firebase config
npm run dev

Environment

Secrets live in per-app .env files (and apps/api/ser.json for the Firebase service account). All of these are git-ignored. See apps/api/.env.example for the API's required variables.

Scripts

API (apps/api)

  • npm run dev - watch-mode dev server (tsx)
  • npm run build / npm start - compile and run
  • npm run db:push / db:studio / db:generate - Prisma
  • npm run words:crawl - crawl word lists

Web (apps/web)

  • npm run dev - Vite dev server
  • npm run build - type-check and production build
  • npm run preview - preview the production build

Deployment

The web and api apps were previously tracked in their own git repos and deployed on Heroku, and are now consolidated into this single repo. For reference, the prior remotes were:

  • API (Heroku): https://git.heroku.com/cryptic-springs-78435.git
  • Web (Heroku): https://git.heroku.com/salty-harbor-49043.git
  • Web (GitHub): https://github.com/23f3001304/typeReal.git

About

Competitive real-time typing app with ghost races and live multiplayer duels. React/Vite + Fastify/Prisma/Socket.io monorepo.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors