Getting Started

Application structure

Understand the responsibility of each directory and the application bootstrap flow.

Beta · v0.2.0Lanjit APIs may change before the stable release. Review the release notes and upgrade guide before updating.

Lanjit separates application code, bootstrap configuration, routes, resources, storage, tests, and framework source into predictable directories. Application services are registered through providers, while bootstrap/app.js connects routing, middleware, and exception handling.

Core directories

Use app for application classes, routes for endpoints and scheduled tasks, resources/views for HTML templates, database for migrations and seeders, and storage for runtime files. The framework directory contains the current framework implementation.

Examples

lanjit/
├── app/
│   ├── Http/Controllers/
│   ├── Http/Middleware/
│   ├── Models/
│   └── Providers/
├── bootstrap/
├── config/
├── database/
│   ├── factories/
│   ├── migrations/
│   └── seeders/
├── framework/
├── public/
├── resources/
│   ├── css/
│   ├── js/
│   └── views/
├── routes/
├── storage/
├── tests/
└── artisan
export default Application.configure({ basePath })
  .withProviders(providerFile)
  .withRouting({ web, api, console, health: '/up' })
  .withMiddleware((middleware) => {
    middleware.alias({ auth: AuthenticateMiddleware });
    middleware.append(SecurityHeadersMiddleware);
  })
  .create();
Edit this page on GitHub

Type to search all documentation.