https://github.com/fyzanshaik/timer-game
Timer game made with React+Typescript & Express+Nodejs+Postgres+Redis. Hosted on Render!
https://github.com/fyzanshaik/timer-game
express nodejs postgresql reactjs redis typescript
Last synced: 4 months ago
JSON representation
Timer game made with React+Typescript & Express+Nodejs+Postgres+Redis. Hosted on Render!
- Host: GitHub
- URL: https://github.com/fyzanshaik/timer-game
- Owner: fyzanshaik
- Created: 2024-10-13T07:54:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T07:53:48.000Z (over 1 year ago)
- Last Synced: 2025-02-02T03:18:21.096Z (over 1 year ago)
- Topics: express, nodejs, postgresql, reactjs, redis, typescript
- Language: TypeScript
- Homepage: https://timer-gamer.vercel.app
- Size: 1.27 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Almost Timer 🎮
A fast-paced reflexes game built with React and Cloudflare infrastructure.
## Tech Stack
- **Frontend**: React + TanStack Router/Query + Vite + Tailwind CSS
- **Backend**: Hono + Cloudflare Workers + D1 (SQLite) + KV Cache
- **Database**: Drizzle ORM
- **Deployment**: Cloudflare Pages & Workers
## Quick Start
### Prerequisites
- Node.js >= 20
- pnpm >= 9.12.0
- Cloudflare account
### Setup
```bash
# Install dependencies
pnpm install
# Setup Cloudflare resources (D1 database, KV namespaces)
wrangler d1 create timer-game-db
wrangler kv:namespace create CACHE
# Update apps/api/wrangler.toml with your database_id and namespace id
# Generate and run migrations
cd packages/db && pnpm db:generate
cd ../../apps/api && pnpm db:migrate
# Start development servers
cd ../.. && pnpm dev
```
Visit `http://localhost:5173` for the web app and `http://localhost:8787` for the API.
## Project Structure
```
├── apps/
│ ├── api/ # Hono API (Cloudflare Worker)
│ └── web/ # React SPA
├── packages/
│ ├── db/ # Drizzle ORM schema
│ └── types/ # Shared TypeScript types
└── .github/workflows/ # CI/CD
```
## Scripts
```bash
pnpm dev # Run all apps
pnpm build # Build all packages
pnpm lint # Lint code
pnpm format # Format code with Prettier
pnpm type-check # Type check
pnpm deploy # Deploy to Cloudflare
```
## Git Hooks
Pre-commit hooks automatically run on every commit to:
- ✨ Format code with Prettier
- 🔍 Lint with ESLint (auto-fix issues)
Type checking is done in CI/CD for faster commits. See [HOOKS.md](./HOOKS.md) for details.
## Game Challenges
- **Quick Reflex** (1s)
- **Speed Test** (5s)
- **Endurance** (10s)
- **Focus Mode** (15s)
- **Ultimate Challenge** (30s)
Stop the timer as close to 0ms remaining for max points (100)!
## License
MIT