🛠 Developer Guide
Tech Stack
- Framework: Next.js (App Router)
- Styling: Tailwind CSS & Vanilla CSS (Theme System)
- Database Drivers:
mssql(SQL Server)mysql2(MySQL/MariaDB)pg(PostgreSQL)
- Icons: Lucide React
- Editor: Monaco Editor
Project Structure
/src/app/page.tsx: Main application entry point and state management./src/lib/db.ts: Core database proxy abstraction. Handles dialect-specific connection logic./src/app/api/db/: All database-related API endpoints (Query, Update, Metadata, etc.)./src/components/: Reusable UI components (DataTable, Sidebar, Designers).
Theme System
The application uses a hybrid CSS variable system.
- Tokens are defined in
globals.cssusing Tailwind's@themeor standard:root. - Light mode is toggled by adding the
.lightclass todocument.documentElement. - The
themestate is managed inpage.tsxand persisted vialocalStorageasforge-theme.
Adding a New Dialect
To add support for a new database type (e.g., SQLite, Oracle):
- Update
DbProxyinterface in@/lib/db.ts. - Implement the connection and query logic in
getDbProxy. - Update metadata queries in
@/app/api/db/metadata/route.tsto support the new dialect's schema. - Ensure
DataTableandUpdatelogic can handle the new dialect's quoting characters (e.g.,"",[], or``).