Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.18 KB

File metadata and controls

24 lines (16 loc) · 1.18 KB

KhmerCoders Web - Copilot Instructions

Project Overview

This is a Next.js application for the KhmerCoders community platform built with TypeScript, using Drizzle ORM with SQLite (via Cloudflare D1), and Tailwind CSS for styling.

Database Schema Location

Primary Schema File: src/libs/db/schema.ts

This file contains all database table definitions using Drizzle ORM for SQLite. Check this file to understand the current database structure and available tables.

Server Actions Examples

Actions Directory: src/server/actions/

For examples of how to implement server actions, refer to these files:

  • src/server/actions/likes.ts - Example of simple CRUD operations with atomic updates
  • src/server/actions/follower.ts - Example of relationship management with batch operations

All server actions use the withAuthAction middleware wrapper and follow consistent patterns for authentication, error handling, and database operations.

Services Directory: src/server/services/ Services is for getting data from the database or manipulating data before sending it to the client.

Example

If you work with table, you can always follow existing pattern at /app/users/page.tsx