First off, thank you for considering contributing to Answerflow! It's people like you that make this community engine better for everyone.
To ensure code quality and consistency, we use Git hooks.
git clone https://github.com/codearcade-io/answerflow
cd answerflow
pnpm installWe do not use Prettier or ESLint. Instead, we use Biome for lightning-fast formatting and linting.
Before committing your code, our pre-commit hooks will automatically run:
- Biome Check:
pnpm biome check --writeto format and lint your changes. - Typecheck:
pnpm typecheckmust pass without any TypeScript errors. - Build:
pnpm buildmust succeed before you push.
We use Conventional Commits (e.g., feat: add new button, fix: resolve crash on login). Our commitlint configuration will verify your commit messages before they are created.
- Fork the repository and create your branch from
main. - Make your changes, ensuring you follow our architectural patterns.
- Commit using Conventional Commits.
- Push your branch and open a PR against
main. - Fill out the PR template completely, including any necessary screenshots or videos.
To ensure consistent optimization and proper handling of our S3/MinIO infrastructure, we use a custom Image wrapper.
Caution
Do not use next/image directly. Always import the Image component from our internal library to ensure local S3 paths are resolved correctly.
// ❌ Avoid this
import Image from "next/image"
// ✅ Do this
import { Image } from "@/components/shared/image"
export const MyComponent = () => {
return (
<Image
src="/path/to/avatar.png"
alt="User Avatar"
width={40}
height={40}
/>
)
}This is a Turborepo monorepo.
apps/: Contains our runnable applications.web/: The main Next.js application handling the AnswerFlow frontend and API routes.docs/: The Next.js documentation site (what you're reading now).worker/: A dedicated Node.js background worker process for heavy asynchronous tasks.
packages/: Reusable packages and modules.constants/: Constants used across the application.db/: The single source of truth for our Prisma schema and generated client.email/: Email Provider integrations.emails/: Email templates and layouts.push-notification/: Contains Push notification functionality created with firebase admin sdk.queue/: Queue adapter with BullMQ & Qstash integrations.rate-limit/: Rate Limiter with redis.redis/: Single source of truth for redis.storage/: Single source of truth for S3 storage.types/: TypeScript types and DTOs.typescript-config/: TypeScript base config for the project.ui/: UI Components.utils/: Utilities and helper functions.validators/: Zod schemas for validation.
For detailed structure refer to our Architecture.
We look forward to your contributions!