How shadowisf/feeltok works
Project type and purpose
• This is a full-stack social media application (“FeelTok”) consisting of:
– A React Native mobile client (CLIENT APP) built with Expo for end users to sign up, authenticate, create/view posts, interact with profiles.
– A Next.js-based admin dashboard (ADMIN APP) for moderators to list, review, resolve, and delete user reports or posts.
• The “backend” is serverless: Firebase (Auth + Firestore) for data and identity, Cloudinary for media storage, and Next.js API routes (in the admin app) as a backend-for-frontend.
File structure
• Top-level directories:
– CLIENT APP – mobile source code, assets, build artifacts, Expo config
– ADMIN APP – web dashboard with Next.js 13 app folder, serverless API routes under src/app/api
• Key patterns & services:
– CLIENT APP uses file-based routing under app/(auth) and app/(tabs), expo-managed workflow, async storage, 2FA, social sign-in.
– ADMIN APP uses Next.js 13 “app router,” Firebase Admin SDK, Cloudinary helper, RESTful API endpoints in route.ts files.
• Config & dependencies: package.json, tsconfig.json, babel.config.js, expo & eas config, firebase service account JSON.
README for insights
• Setup instructions confirm:
– CLIENT APP: Expo mobile dev environment, .apk/.app builds in builds folder.
– ADMIN APP: Next.js dev server that uses Firebase service account.
• No separate custom backend code beyond Next.js API routes and Firebase.
Main components & interactions
a. Components
1. Mobile Client (React Native / Expo)
2. Admin Dashboard (Next.js)
3. Firebase Auth & Firestore Database
4. Firebase Admin SDK (used by Next.js API)
5. Cloudinary Media Service
6. Device Local Storage (AsyncStorage on mobile)
b. Data flows & relationships
– Mobile ↔ Firebase Auth: user sign-in, sign-up, OTP, 2FA
– Mobile ↔ Firestore: CRUD operations on posts and user profiles via Firebase SDK
– Mobile ↔ Cloudinary: image/video upload & retrieval through Cloudinary REST API or SDK
– Admin Dashboard ↔ Firebase Admin SDK: secure, server-side management of Firestore data
– Admin API routes ↔ Firestore: listAllPosts, resolvePostReport, toggleUser, etc.
– Admin Dashboard UI calls its own Next.js API routes, which in turn call Firebase Admin SDK.
c. Architectural patterns & design principles
– Serverless / BFF (Backend-for-Frontend) for admin: Next.js API routes wrap Firebase Admin SDK rather than exposing SDK to browser.
– File-based routing both in Next.js and Expo.
– Separation of concerns: client only uses client-side Firebase SDK; admin uses server-side SDK.
– Cloud services for scale: Firebase & Cloudinary.
d. Key technologies & libraries
– React Native + Expo + TypeScript
– Next.js 13 app router + React + TypeScript
– Firebase Auth & Firestore + Firebase Admin SDK
– Cloudinary API helper modules
– AsyncStorage, two-factor auth logic, social login utilities