Project Setup & the Current Astro Baseline
Website Rebuild with Astro
Chapter 1 · Project Setup & the Current Astro Baseline
This is the fifth and final course in the Website Rebuild series, alongside the already-complete Next.js, Django, Laravel, and Rails rebuilds. It builds directly on the standalone astro1 course — this chapter assumes everything through that course's own Chapter 10 is already familiar ground.
Scaffolding the Project
Server Output From Day One
The standalone astro1 course started static by default and only reached output: 'server' in its own Chapter 10, once a genuine reason showed up. This rebuild has that reason from the very first line — a real admin interface, exactly like every one of the four completed sibling courses needed — so server mode is configured immediately rather than migrated to later.
An Honest Starting Position: No Built-In ORM, No Built-In Auth
auth app. Laravel ships Eloquent and its own Auth facade. Rails ships ActiveRecord and has_secure_password. A freshly scaffolded Astro project has none of that — no database layer, no authentication mechanism, nothing opinionated about either. This puts Astro in the same real category as Next.js, not the other three: both are JS/TS-ecosystem frameworks that assume the backend is entirely the developer's own choice.
This isn't a gap to apologize for — it's a genuinely different starting philosophy, and it shapes real decisions later in this course: Chapter 2 reaches for a real ORM (Drizzle, not reused from Next.js's own Prisma, to give this course its own technical texture) precisely because nothing comes built in, and Chapter 9 solves authentication by directly reusing the Next.js rebuild's own bcryptjs approach — a genuine, honest case of two siblings sharing a real solution because they share a real ecosystem.
Five Frameworks, Compared Honestly
| Next.js | Django | Laravel | Rails | Astro | |
|---|---|---|---|---|---|
| Built-in ORM? | No | Yes | Yes | Yes | No |
| Built-in auth? | No | Yes | Yes | Yes | No |
| Backend philosophy | Bring your own | Batteries included | Batteries included | Batteries included | Bring your own |
Coming in Chapter 2
drizzle-orm and mysql2 are installed and the self-referencing Page table is designed starting in Chapter 2 — this chapter's own job is only to establish the project's real starting shape.
Hands-On Exercises
Scaffold a new Astro project via npm create astro@latest, and confirm the default starter runs correctly in the dev server.
📄 View solutionConfigure output: 'server' with the Node adapter in astro.config.mjs, and confirm the dev server still runs correctly in server mode.
📄 View solutionInspect the freshly scaffolded project's package.json and confirm no ORM or authentication package is present anywhere in its dependencies — contrasting this with what a fresh Rails or Laravel project's own default Gemfile/composer.json already includes.
📄 View solutionChapter 1 Quick Reference
npm create astro@latest— scaffolds the projectoutput: 'server'+@astrojs/node— configured immediately, not migrated to later- No built-in ORM or auth — genuinely closer to Next.js's own "bring your own backend" than to Django/Laravel/Rails
- Not yet configured — the database layer starts in Chapter 2
- Next chapter: Designing a Flexible URL & Content Model