Files
desa-darmasaba/GEMINI.md

2.6 KiB

Project: Desa Darmasaba

Project Overview

The desa-darmasaba project is a Next.js (version 15+) application developed with TypeScript. It serves as an official platform for Desa Darmasaba (a village in Badung, Bali), offering various public services, news, and detailed village profiles.

Key Technologies:

  • Frontend Framework: Next.js (v15+) with React (v19+)
  • Language: TypeScript
  • UI Library: Mantine UI
  • Database ORM: Prisma (v6+)
  • Database: PostgreSQL (as configured in prisma/schema.prisma)
  • API Framework: Elysia (used for API routes, as seen in dependencies)
  • State Management: Potentially Jotai and Valtio (listed in dependencies)
  • Image Processing: Sharp
  • Package Manager: Likely Bun, given bun.lockb and the prisma:seed script.

The application architecture follows the Next.js App Router structure, with comprehensive data models defined in prisma/schema.prisma covering various domains like public information, health, security, economy, innovation, environment, and education. It also includes configurations for image handling and caching.

Building and Running

This project uses bun as the package manager. Ensure Bun is installed to run these commands.

  • Install Dependencies:

    bun install
    
  • Development Server: Runs the Next.js development server.

    bun run dev
    
  • Build for Production: Builds the Next.js application for production deployment.

    bun run build
    
  • Start Production Server: Starts the Next.js application in production mode.

    bun run start
    
  • Database Seeding: Executes the Prisma seeding script to populate the database.

    bun run prisma:seed
    

Development Conventions

  • Coding Language: TypeScript is strictly enforced.
  • Frontend Framework: Next.js App Router for page and component structuring.
  • UI/UX: Adherence to Mantine UI component library for consistent styling and user experience.
  • Database Interaction: Prisma ORM is used for all database operations, with a PostgreSQL database.
  • Linting: ESLint is configured with next/core-web-vitals and next/typescript to maintain code quality and adherence to Next.js and TypeScript best practices.
  • Styling: PostCSS is used, with postcss-preset-mantine and postcss-simple-vars defining Mantine-specific breakpoints and other CSS variables.
  • Imports: Absolute imports are configured using @/* which resolves to the src/ directory.