# MVC-Starter - Development Guide

**Date:** 2026-03-11T11:59:39Z

## Prerequisites

- Windows environment
- IIS with Classic ASP enabled
- IIS URL Rewrite module
- Microsoft Access Database Engine
- Windows Script Host (`cscript`)

## Local Setup

1. Place the project on a Windows machine with IIS.
2. Point the site root to `public/`.
3. Update `public/web.config` for the correct database and logging paths.
4. Browse to `/` and confirm the starter home page renders.

## Common Workflows

### Add a database-backed feature

1. Generate a migration
2. Generate POBO/repository
3. Move generated files into `app/models/` and `app/repositories/`
4. Generate a controller
5. Include the controller from `app/controllers/autoload_controllers.asp`
6. Register the controller in `core/lib.ControllerRegistry.asp`
7. Add routes in `public/Default.asp`
8. Add corresponding views in `app/views/`

### Useful Commands

```bat
cscript //nologo scripts\generateMigration.vbs create_my_table
cscript //nologo scripts\GenerateRepo.vbs /table:my_table /pk:id
cscript //nologo scripts\generateController.vbs MyController "Index;Show(id)"
cscript //nologo scripts\runMigrations.vbs status
```

## Testing Approach

- Manual runtime validation through IIS
- Manual route/layout verification after controller or view changes
- Script validation through `cscript`
- No built-in automated test suite detected

## High-Risk Change Areas

- `public/Default.asp`
- `public/web.config`
- `core/mvc.asp`
- `core/lib.ControllerRegistry.asp`
- shared layout files under `app/views/shared/`
