Authentication
- Register a new user account
- Log in and log out
- Your own mailbox, always on file
A single-page email client built with Django and JavaScript, where inboxes, messages, replies, and archives update dynamically without full-page reloads.
no reload - just render
THE IDEA
Mail is a single-page email client built as part of CS50's Web Programming with Python and JavaScript (CS50W). It recreates the core loop of an email service like Gmail - send, receive, read, archive, reply - but every switch, open, and action happens inside one page.
The backend API was provided by the project, so the build was never about inventing mail infrastructure. The real work was the front end: JavaScript that fetches from that API, then updates the interface on the other side of each response.
THE CHALLENGE
A conventional multi-page flow could reload the browser every time someone opened a mailbox, read an email, archived something, or replied. Mail instead had to respond dynamically - no reload, just an updated page.
MAILBOX EXPERIENCE
Users move between their mailboxes inside the same single-page interface - no new page, no full reload.
Received emails, listed and ready to open.
Everything the user has sent, in one place.
Filed-away emails, retrievable at any time.
WHAT I BUILT
Eight focused features - nothing claimed that wasn't built.
THE EMAIL LIFECYCLE
Compose, read, and file away - each flows through the same single-page interface.
FETCH, THEN RENDER
The JavaScript client talks to the provided backend API through the browser's Fetch API. Every user action becomes a request, and the returned data is what the interface renders - no full-page reloads for the core email actions.
DYNAMIC DOM
JavaScript decides what the user sees at any moment by changing the DOM in place - mailboxes, messages, compose views, and reply forms all live in the same page.
AUTHENTICATION
A classic, documented loop: new users register, existing users log in, and everyone can log out. The email interface sits behind this authenticated experience.
ARCHIVE SYSTEM
Received emails can be archived and later unarchived - filed away, never lost, and always one click from the inbox again.
REPLY EXPERIENCE
Replying to an email carries the original message along - the reply form is pre-filled from the email being answered, so a reply is almost a one-click send.
UNDER THE HOOD
Django structures the app and serves the API; JavaScript is the client-side layer that requests data and updates the interface.
PROJECT STRUCTURE
The documented project layout - with the SPA's heart up front.
mail/Main application - views, templates, static files, and API logic.project3/Django project configuration.templates/mail/HTML templates for the email client.static/mail/inbox.jsThe core JavaScript file driving the SPA behaviour.the SPA corestatic/mail/styles.cssStyling for the email client.manage.pyDjango management utility.JAVASCRIPT AS THE CORE
Every email action - loading a mailbox, reading a message, archiving, replying, composing - is handled in JavaScript. The browser asks the API, and the page updates itself in response.
WHAT THIS PROJECT TAUGHT ME
A single page, a backend API, and JavaScript that holds the whole experience together.
TECHNICAL PIPELINE
This is the project's key story: a user action, a JavaScript event, a fetch, backend data, and a DOM update - the complete round trip that keeps the page feeling alive.
0 full-page reloads. 1 page. 7 steps.
BUILT WITH CS50W
Mail was created as part of CS50's Web Programming with Python and JavaScript (CS50W). The spotlight fell on JavaScript - APIs, asynchronous requests, DOM manipulation, and single-page behaviour - with Django serving the backend.
CS50W projectPROJECT DETAILS
The whole single-page client lives on GitHub - and the screencast walks through it.