Project tutorial
Build an Express Blog
Build Copperline Journal with Express, MongoDB, EJS, Bootstrap, Passport sessions, profiles, owned post CRUD, search, password recovery, and a Render deployment.
How this project works
Copperline Journal is an original teaching blog built in twelve complete snapshots. Clone once and run any numbered folder without rebuilding all earlier stages.
The path starts with Express and routing, adds EJS and Bootstrap, then introduces isolated MongoDB databases for data, accounts, posts, and sessions. Later parts add media, ownership, pagination, search, secure reset tokens, and deployment.
Snapshots 4–12 include deterministic seed accounts: [email protected] and [email protected], both using password123. Use them to test authentication and authorization.
Local services run through Docker Compose. The final snapshot documents Render, MongoDB Atlas, SMTP, secure cookies, and environment-only secrets.
Start with part 1 Open GitHub repo
Parts in order
Work through the parts in sequence. Each lesson explains the ideas in plain language, then points you to a complete runnable snapshot on GitHub for that stage.
- Part 1: Getting StartedCreate a minimal Express server on port 3000.
- Part 2: RoutingOrganize page routes with an Express Router.
- Part 3: Layout and UIRender EJS pages with shared partials and Bootstrap 5.
- Part 4: Data LayerPersist authors and posts with MongoDB and Mongoose.
- Part 5: Feed and DetailBuild a database-backed feed and individual post pages.
- Part 6: RegistrationValidate accounts and store bcrypt password hashes.
- Part 7: Login and SessionsAuthenticate with Passport Local and Mongo-backed sessions.
- Part 8: Profiles and MediaShow author profiles and accept constrained avatar uploads.
- Part 9: Posts CRUD and OwnershipCreate, edit, and delete posts with owner authorization.
- Part 10: Pagination and SearchPaginate the feed and search indexed post text.
- Part 11: Password ResetIssue expiring one-use password reset links.
- Part 12: DeployPrepare Copperline Journal for Render and MongoDB Atlas.