-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
Welcome to the development side of WordSeek. This guide provides an overview of the project structure, technology choices, and how to contribute to the codebase.
WordSeek is organized into a clean, modular structure:
-
src/: Core source code.-
commands/: Command handlers (e.g.,/new,/score). -
handlers/: Message and callback query handlers. -
services/: Business logic (Game engine, user management). -
queues/: Background jobs (BullMQ). -
config/: Environment and constant configurations. -
helpers/: Reusable utility functions.
-
-
migrations/: Database schema migrations (Kysely). -
wiki_drafts/: Source files for this documentation.
▪ Bun.js: Chosen for its incredible startup speed and built-in support for TypeScript and SQLite (for tests).
▪ grammY: The most modern and extensible Telegram framework, allowing for clean composer-based logic.
▪ Kysely: Provides full type-safety for SQL queries, preventing runtime database errors.
▪ Redis: Essential for managing game state and high-frequency ranking updates.
Follow the Getting Started guide to set up your environment.
Use bun run dev to start the bot with hot-reloading.
We use Kysely for migrations. To create a new migration:
bun run kysely:make my_migration_nameTo apply migrations:
bun run db:migrate- Create a new file in
src/commands/. - Implement your logic using a
Composer. - Export the composer and register it in
src/commands/index.ts.
We welcome contributions!
- Fork the repository.
- Create a feature branch.
- Commit your changes with clear messages.
- Open a Pull Request.
Next: For common issues and solutions, see the FAQ & Troubleshooting guide.
WordSeek Project — Engineered for performance and community fun.