Skip to content

devfrankduah/Spark

Repository files navigation

Spark

Spark is a social platform built for children, designed around a single principle: safety by subtraction. It deliberately removes the mechanics that make mainstream social media unsafe or addictive for kids. There are no likes, no public comments, and no follower counts. What remains is direct, private communication: real-time chat, audio and video calling, and time-limited status sharing between connected users.

Access to the platform is gated by a machine learning age-verification pipeline, so the network stays limited to the age group it was built for.

Spark began as a University of Ghana final-year thesis, "Using Machine Learning to Make Social Media Safe for Kids" (October 2022).

Why it is built this way

Vanity metrics (likes, comment threads, follower counts) drive comparison, pile-on behavior, and compulsive use. For an audience of children, those are not features, they are risks. Spark removes them by design rather than moderating them after the fact. Communication is one-to-one or between mutually accepted connections, which keeps the surface area for abuse small.

Features

  • Connection-based social graph with mutual accept, no public follower counts.
  • Real-time one-to-one chat with text, images, audio notes, documents, and video.
  • Audio and video calling.
  • Time-limited status/story sharing.
  • Local-first storage of profile, chat, and call history using SQLite, so recent content is available without a live connection.
  • Machine learning age verification during onboarding.

Architecture

Spark has two parts:

  1. The application: a Flutter client backed by Firebase, with a local SQLite store for offline resilience.
  2. The age-verification layer: a computer-vision and OCR pipeline that confirms a user falls within the intended age range before granting access.

A full description of the data flow, the local store, the Firestore model, and the age-verification pipeline is in ARCHITECTURE.md.

Tech stack

Application:

  • Flutter and Dart (Dart SDK >=3.0.0 <4.0.0)
  • Firebase Authentication (email/password and Google sign-in)
  • Cloud Firestore (primary data store)
  • Firebase Storage (media)
  • Firebase Cloud Messaging (notifications)
  • SQLite via sqflite (local store)
  • Jitsi for audio/video calling

Age-verification pipeline:

  • MTCNN for face detection
  • Inception v2 with FaceNet for face verification
  • EasyOCR for reading identity documents
  • VGG16 transfer-learning classifiers at two age thresholds, combined into a single deployed model to reduce size and latency

Project structure

lib/
  backend/
    firebase/                 Auth and Firestore/Storage access
    sqlite_management/        Local SQLite store (LocalDatabase)
  frontend/                   Screens: auth, main, calls, status, onboarding
  services/                   Chat, search, notifications
  models/                     Data models exchanged between layers
  global_uses/                Shared constants, enums, validators
  widgets/                    Reusable widgets

Getting started

Prerequisites:

  • Flutter with a Dart 3 SDK (flutter --version).
  • A Firebase project of your own.

Setup:

git clone https://github.com/devfrankduah/Spark.git
cd Spark
flutter pub get

Firebase configuration is not committed to this repository. Create your own Firebase project and add its config files locally:

  • android/app/google-services.json
  • ios/Runner/GoogleService-Info.plist

These are listed in .gitignore on purpose. The Android config contains client identifiers rather than secret credentials; access to data is controlled by Firestore Security Rules and Firebase App Check, not by hiding this file. See the security note in ARCHITECTURE.md.

Run the app:

flutter run

Contributions

Frank Duah led the application and frontend development and co-developed the machine learning age-verification pipeline as part of the thesis team. The age-verification pipeline (model training and evaluation) lives in a separate research codebase; this repository is the Flutter application.

Status

This is a portfolio project under active modernization. Current work: formalizing the local-first data layer into a connectivity-aware sync architecture, documenting the age-verification tradeoffs with benchmarks, and migrating dependencies to current versions. See ARCHITECTURE.md for the design of the work in progress.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from github/welcome-to-github