Fall 2026
  • Discord
  • Gradescope
  • Syllabus

On this page

  • Learning objectives
  • Instructions
  • Grading rubric
  • Extra credit
  • Submission

Final Project: Twitter Clone

Two-panel CommitStrip comic. Top: 'How back-end developers see front-end developers,' where a back-end dev thinks front-end devs are just playing with JS and HTML/CSS and calls them 'PSD slicers.' Bottom: 'How front-end developers see back-end developers,' where a front-end dev dismisses 'big data' as 'only CRUD all day long' and calls them a 'code monkey.'

For the final project, you will build a small Twitter-like site where people sign up, log in, post messages, and read a shared feed. Your Python web server will generate the pages and store the data in a database. The project includes both the front end and the back end shown in the comic.

Repository due: Wednesday, December 16 at 11:59pm. Live demo: Wednesday, December 16, 2:00–5:00pm, during the official final-exam slot; see Submission below.

Learning objectives

  1. create large Python programs that span multiple files
  2. develop a CRUD (Create, Read, Update, Delete) web app
  3. understand how social media websites work
  4. integrate the Python, Markdown, HTML, CSS, Jinja2, and SQL languages
  5. practice using git

Instructions

Extend the FastAPI app from the backend web development lab. The project uses Python across several files, a sqlite3 database, Jinja2 templates, CSS, and SQL.

The site implements CRUD: Create, Read, Update, and Delete. Users create accounts and post messages, read the feed, update posts they want to fix, and delete the ones they regret.

Grading rubric

This project is graded out of 62 points. 30 points come from the required tasks that everyone must complete, and there are 138 points of optional tasks to choose from. Your grade is capped at 129/62 points, so choose the optional tasks you find most interesting.

The five required routes are checked by instructor-owned pytest tests in Gradescope (6 points each). The grader imports the FastAPI app, uses an isolated TestClient, creates unique test accounts and messages, and never contacts the public internet. Optional objective features are tested only when claimed in submission.toml. The themed-design task remains a 4-point instructor review because visual quality is subjective.

Warning: If I can break into your site with a SQL injection attack, you take a -13 point penalty.

Warning: If I can break into your site with an HTML injection attack, you take a -5 point penalty.

Warning: While grading, I’ll actively try to make your site throw an Internal Server Error. If I manage it, you get no points for the task that caused it.

Hint: Complete extra tasks as a buffer in case a feature breaks during the demo or does not meet the rubric.

Required tasks

Each required task is worth 6 points and matches one route on your site.

  • Home, 6 points

    • (this check exists to make you confront SQL and HTML injection early)

  • Log in, 6 points

    • Hint: Don’t use type=text on your input tag. Find the input type meant for passwords.

  • Log out, 6 points

    • Hint: We didn’t cover deleting cookies in class, but this StackOverflow post explains it.

  • Create new user accounts, 6 points

    • Hint: You know an account already exists because the INSERT fails with a sqlite error about violating a unique constraint.

  • Create a message, 6 points

Extra credit

The following tasks are each worth 4 points:

  • I’ll use my own aesthetic judgment for what counts as “nicely themed,” but the simple CSS from the start of the course is sufficient.

  • Hint: Modify the db_create.py file to generate the messages randomly.

  • Hint: If you haven’t tested the connection from a computer that isn’t yours, you haven’t finished this task and won’t get the points.

The following tasks are each worth 8 points. Each one needs either more advanced SQL (a trickier SELECT) or a change to your table schemas:

  • Hint: You can reuse the Markdown compiler you built in Project 1 to turn the Markdown into the HTML you display.

    Hint: This combines easily with the 4-point task for linking URLs.

The following tasks are each worth 12 points of extra credit:

  • Hint: This pairs well with the 8-point reply task.

Submission

Push your project to GitHub, then submit the repository and branch to the Final Project programming assignment on Gradescope by 11:59pm on Wednesday, December 16. Gradescope grades the exact commit you select, so resubmit after pushing a fix.

Add submission.toml at the repository root so the grader does not have to guess your module, route names, or HTML form-field names:

[app]
module = "main"          # Python import path, without .py
object = "app"           # FastAPI object in that module
home = "/"
login = "/login"
logout = "/logout"
signup = "/create_user"
new_message = "/create_message"

[forms]
username = "username"
password = "password"
password_confirm = "password2"
message = "message"

[features]
# Use true for structural features, a route path for route-based features,
# and a URL for published_site. Delete or leave false anything not claimed.
linked_urls = false
large_seed = false
delete_messages = false
edit_messages = false
delete_accounts = false
signup_login = false
change_password = false
user_images = false
messages_json = false
published_site = false
pagination = false
profiles = false
mentions = false
search = false
fts5 = false
email_reset = false
replies = false
nested_replies = false
languages = false
markdown = false
javascript_crud = false
ai_account = false

For example, claiming a JSON route would use messages_json = "/messages.json", and claiming a published site would use published_site = "https://your-site.example/". Unclaimed optional tests are skipped and do not lower your score.

You will also give a five-to-fifteen-minute one-on-one demo during the official final slot, Wednesday, December 16 from 2:00–5:00pm. The automated result should already show the functional checks; use the demo to show the subjective design point, outside-service evidence, and any unusual feature the grader could not identify. Before your slot, push the version you plan to show and confirm that the site launches.