A Django-based social network integrating a fame (skill profile) system to combat misinformation — built as a university project for the Big Data Engineering course at Saarland University (Summer 2026, Prof. Dr. Jens Dittrich).
The skeleton application (data models, basic views, fake data generation, magic AI classifier) was provided by the university. All feature implementations listed below were written by me.
The base skeleton is © Prof. Dr. Jens Dittrich, Saarland University, licensed under CC BY-NC 4.0.
Every user has a fame profile — a set of skill levels across expertise areas (e.g. "Quantum Physics: Pro", "Sports: Bullshitter"). Posts are classified by a topic-detection algorithm and cross-checked against the author's fame profile. Users who post misinformation have their fame lowered automatically; persistent offenders are banned.
Post submission logic (submit_post)
- Posts are blocked from publishing if the author has negative fame in any of the post's expertise areas
- When a post gets a negative truth rating, the author's fame in that area is automatically lowered to the next level
- If the expertise area is new to the user's profile, a "Confuser" entry is added
- If fame cannot be lowered further, the user is banned:
is_activeset toFalse, all their posts unpublished, session terminated - When fame drops below Super Pro (100), the user is automatically removed from the corresponding community
Bullshitters (bullshitters)
- Returns a dictionary mapping each expertise area to a ranked list of users with negative fame in that area
- Sorted by fame level ascending (worst first), ties broken by
date_joineddescending
Community system (join_community, leave_community)
- Users with fame ≥ Super Pro (numeric value 100) in an expertise area can join that area's community
- Community membership is tracked via a ManyToMany relationship on
SocialNetworkUsers
Community mode timeline (timeline)
- Standard mode: shows posts from followed users
- Community mode: shows only posts where both the author and the viewer share at least one community, using a correlated subquery (
EXISTS) for efficiency
Similar users (similar_users)
- Computes a similarity score between the logged-in user and every other user
- Score = fraction of the user's expertise areas where the fame values differ by ≤ 100
- Results returned as an annotated
QuerySetsorted by similarity descending, ties broken bydate_joined
- Bullshitters page — renders
api.bullshitters()grouped by expertise area - Similar users page — renders
api.similar_users()as a ranked table with links to fame profiles - Community controls — join, leave, and toggle community mode; all update the timeline immediately
- Timeline — extended to show current mode, joinable communities, and communities the user is already in
timeline.html— community mode toggle button, "My Communities" panel with leave buttons, "Communities You Can Join" panel with join buttonsbullshitters.html— grouped table per expertise area, sorted by fame levelsimilar_users.html— ranked table with similarity score and link to each user's fame profilebase.html— added navigation links for Bullshitters and Similar Usersindex.html(URIs page) — added links to all implemented HTML views
- Relational database design — multi-table inheritance, ManyToMany with custom through-tables, self-referencing foreign keys (expertise area hierarchy)
- Django ORM —
annotate,Case/When,Exists,OuterRef,select_related,Qobjects, correlated subqueries - Query optimisation — avoided N+1 queries using
select_relatedand bulk lookups; usedEXISTSinstead of JOINs where only existence matters - Database consistency — understood atomicity issues in multi-step operations (ban + unpublish + post save)
- Django auth — session management,
is_activeflag, login/logout flow
You need pipenv:
pip install --user pipenv
pipenv install # creates virtualenv and installs dependencies (Python 3.12)
pipenv shell # activates the virtualenv# Recreate database, migrations, and fake data
bash recreate_models_and_data.sh
# Start the development server
python manage.py runserver
# → http://127.0.0.1:8000/python manage.py testTests use the fixture database_dump.json. Login credentials for the test user: a@b.de / test.