char.build - Modular Application Platform

A modular application platform where each page functions as an independent application, sharing only authentication and header styling.

Project Structure

char.build/
├── index.js               # Main entry point and router
├── core/                  # Shared functionality
│   ├── header.js          # Shared header component with auth
│   ├── db.js              # Database utilities
│   └── registry.js        # App registry for routing
├── apps/                  # Individual applications
│   ├── notes/             # Notes application
│   │   ├── index.js       # Routes and backend logic
│   │   └── ui.js          # Frontend UI
│   ├── template/          # Template for new apps
│   │   ├── index.js       # Routes template
│   │   └── ui.js          # UI template
│   └── [app-name]/        # Additional applications
└── README.md              # This file

How It Works

  • Each app is completely independent and self-contained within its own directory
  • Apps share authentication through the lastlogin middleware
  • Each app has its own frontend and backend code
  • Apps can have their own unique styling while maintaining a consistent header

Adding a New App

  1. Copy the apps/template directory to apps/[your-app-name]
  2. Customize the UI in apps/[your-app-name]/ui.js
  3. Add your backend routes in apps/[your-app-name]/index.js
  4. Register your app in core/registry.js:
export const appRegistry = { // Existing apps... // Add your app yourAppName: { name: 'Your App Display Name', description: 'Brief description of your app', routes: (await import('../apps/your-app-name/index.js')).default, }, };

Key Features

  • Truly Modular: Work on each app independently without affecting others
  • Shared Authentication: Google authentication through lastlogin is available in all apps
  • Consistent Header: All apps share the same header with navigation
  • Independent Styling: Each app can have its own unique UI/UX
  • Database Integration: Built-in SQLite functionality with table prefixing for isolation

Design Philosophy

The guiding philosophy is that adding a new page or feature should be as simple as:

  1. Adding a new directory
  2. Writing your app code
  3. Registering it in one place

No need to modify routing in multiple places or navigate through complex file structures. Everything your app needs should be within its own directory.