Imported from ayou33/MineWAPP (
src/pages/AGENTS.md). Install upstream withnpx skills add ayou33/MineWAPP --skill pages. Copyright stays with the author.
src/pages — Routes
Auto-generated by @generouted/solid-router. Add a route = add a file here; src/router.ts is generated and must not be hand-edited.
Pattern
Every page is a thin wrapper:
import ScopedPage from '@/provider/scopedPage/ScopedPage'
import { AUTH_ROLE } from '@/config'
import Foo from '@/modules/foo/Foo.index'
export default function FooPage () {
return <ScopedPage scope={AUTH_ROLE.PRIVATE} pageCode="foo">{Foo}</ScopedPage>
}
Current routes
/ (home), /about, /auth, /example — all AUTH_ROLE.PASSENGER.
Conventions
- Keep pages to the wrapper only — all UI lives in
src/modules/. - Choose
scopefromAUTH_ROLE; unauthenticated users onUSER+pages are redirected toAUTH_PATH.