Skip to content

Repository files navigation

Dvange

Repository name: fuy
Current product/application name in code: Dvange

This repository contains a broad social/lifestyle platform implemented across a Next.js web application and an Expo React Native mobile application, with PostgreSQL/Prisma and Supabase-backed data/auth infrastructure.

The repository name and current product branding do not match. This README uses Dvange because the current web/mobile package names, Expo configuration, app scheme and native bundle identifiers use that name.

What is in the repository

Dvange is not only a social feed. The current code and database model cover a much wider set of domains:

  • social profiles, follows and posts
  • media feeds and short-form content
  • chat and conversations
  • collaboration features
  • channels/groups
  • activities and social activity tracking
  • trust/reputation metrics
  • bonds and relationship-oriented features
  • journaling
  • organization/work/task management
  • e-commerce, brands, products, reviews, carts, orders and payments
  • routes, places and waypoint/photo sharing
  • Wrex-style gym/workout functionality
  • plans and group participation
  • moderation, reports and reactions
  • privacy, blocks, mutes and hidden content
  • Bloom/subscription-style content relationships
  • profile-card/access-request flows
  • human-verification state
  • audio assets and saved audio
  • device/key material for per-device security

The mobile application additionally requests camera, microphone, media-library and foreground/background location capabilities, and includes mapping, notifications and native workout-widget integration.

High-level architecture

fuy/
├── src/                    # Next.js web application
│   ├── app/                # App Router pages + API routes
│   ├── components/
│   ├── context/
│   ├── hooks/
│   ├── lib/
│   ├── middleware.ts
│   └── styles/
├── prisma/
│   ├── schema.prisma       # large PostgreSQL domain model
│   └── seed.ts             # database seed path
├── supabase/               # Supabase configuration/migrations/functions
├── mobile/                 # Expo/React Native app
├── public/                 # web/static assets
├── scripts/                # maintenance/support scripts
├── package.json            # web/root package
├── next.config.mjs
├── app.json / eas.json     # additional Expo/EAS configuration at repo root
└── ...

Web application

The root web package is named dvange and currently uses:

  • Next.js 14.2.7
  • React 18.2
  • TypeScript
  • Prisma 6 with PostgreSQL
  • Supabase SSR/client libraries
  • Zustand
  • WebAuthn libraries
  • AWS S3-compatible client/presigning libraries
  • MediaPipe vision tasks
  • TensorFlow.js
  • Leaflet/React Leaflet
  • Three.js / React Three Fiber
  • image processing through Sharp/Jimp/browser compression
  • moderation-related libraries such as bad-words and nsfwjs
  • JOSE/bcrypt-based security utilities
  • Resend for email delivery
  • PDF generation/manipulation utilities

Web routes/surfaces

The App Router contains a large product surface. Examples visible directly in src/app/ include:

  • about
  • activity
  • admin
  • api
  • audio
  • auth
  • awe-routes
  • bonds
  • cart
  • chan / channel
  • chat
  • community-guidelines
  • contact-us
  • create-post
  • dashboard
  • legal/policy pages
  • additional social, commerce and product surfaces deeper in the tree

This means the web app combines end-user product screens and server/API behavior in the same Next.js codebase.

Mobile application

Location: mobile/

Current native stack:

  • Expo 54
  • React Native 0.81.5
  • React 19.1
  • Expo Router
  • Supabase JS
  • MapLibre and React Native Maps
  • FlashList
  • MMKV/AsyncStorage
  • Expo Camera/Image Picker/Video/Audio
  • Expo Location with background-location support
  • Expo Notifications + Notifee
  • Secure Store and local authentication
  • TweetNaCl / CryptoJS / hash-wasm
  • React Three Fiber/Drei
  • NativeWind/Tailwind-related styling infrastructure

Native identity

The checked-in Expo configuration identifies the application as:

name: Dvange
slug: dvange
iOS bundleIdentifier: com.dvange.app
Android package: com.dvange.app
URL scheme: dvange

The privacy policy configured in the Expo file currently points to https://fuymedia.org/privacy, another indication that historical naming is still present in the repository.

Mobile permissions

The app requests capabilities for:

  • camera
  • microphone
  • photo/media access
  • Internet/network state
  • coarse and fine location
  • background location
  • foreground location service

Those permissions should remain tied to real, user-visible functionality and platform policy disclosures. Avoid retaining duplicate or unnecessary permissions when preparing store releases.

Database model

prisma/schema.prisma is one of the central architecture files. It uses PostgreSQL and models substantially more than authentication.

Core user/social layer

User includes:

  • account/profile identity
  • email verification
  • last-seen status
  • follower/following counters
  • lifetime impressions
  • capped count
  • derived trust score
  • posts and media
  • groups and memberships
  • friendships
  • passkeys
  • follows/subscriptions
  • post likes/comments

Feed

The FeedItem model is deliberately denormalized for lower-join reads and stores:

  • author snapshot fields
  • post type/feature
  • content snippet
  • media preview metadata
  • engagement counters
  • timestamps

This should be kept synchronized with source post/user data through server-controlled code rather than client trust.

Messaging/collaboration

The schema contains:

  • pair conversations
  • sent messages
  • message tags
  • feature sessions/participants
  • chat-session logs
  • analytics/state
  • collaboration invitations
  • collaboration updates

Commerce

The schema links users to:

  • owned brands
  • products sold
  • product/brand reviews
  • orders
  • payments
  • views
  • wishlists
  • profile-card marketplace state

Activity, health and fitness

The model includes structures for:

  • activities, likes, comments and tags
  • group activities/participants
  • gym partners
  • workout plans/sessions
  • health conditions
  • diet plans
  • biometric logs
  • nutrition logs
  • saved foods

Places and routes

The user graph also connects to:

  • route waypoints
  • waypoint photos/shares
  • place reviews
  • place photos/shares

Moderation and privacy

The schema includes:

  • bans and reasons
  • moderation logs
  • reports
  • blocks
  • mutes
  • hidden posts
  • default post visibility
  • tagging privacy
  • notification settings
  • profile-card/stalk-me privacy fields
  • allowlists
  • access requests
  • human-verification state

Privacy and privileged moderation fields must be modified through trusted backend paths, not directly trusted client payloads.

Security-related components

The dependency and schema surface shows several security mechanisms:

  • password hashing
  • JOSE/JWT utilities
  • WebAuthn/passkeys
  • Supabase authentication
  • device/key-pair records
  • secure mobile storage
  • human verification
  • moderation/reporting controls
  • privacy/block/mute structures

The presence of these mechanisms is not equivalent to a completed security audit. In particular, verify authorization on every API route, ensure object ownership is enforced server-side, protect admin actions, and keep media/object-store access consistent with database permissions.

Media and storage

The web package includes AWS S3 client/presigner support while the broader repository also contains Supabase integration. Before deployment, confirm which object storage path is canonical for each media type so uploads are not split unintentionally across multiple storage providers.

The app also contains image/video manipulation and media-analysis dependencies, so file type, size, metadata and content-moderation checks should be performed before persistence or public serving.

Local development — web

Requirements

  • Node.js >=18.18
  • PostgreSQL compatible with the Prisma schema
  • environment variables required by the application/Supabase/storage integrations

Install

git clone https://github.com/dharan1007/fuy.git
cd fuy
npm install

Configure database

Set DATABASE_URL for PostgreSQL, then generate Prisma Client:

npx prisma generate

Useful commands:

npm run prisma:studio
npm run prisma:seed

Run web

npm run dev

Build web

npm run build
npm start

The build command runs Prisma generation before next build.

Local development — mobile

cd mobile
npm install
npx expo start

Native development commands:

npm run android
npm run ios
npm run web

Because this app uses native modules and background capabilities, Expo Go is not a substitute for a development build for every feature.

Environment/configuration

Do not commit production secrets. Depending on the feature being exercised, the codebase may require configuration for:

  • PostgreSQL/Prisma
  • Supabase URL/keys
  • storage/presigned upload infrastructure
  • email delivery
  • authentication providers
  • mobile EAS/update configuration

Use the checked-in environment examples/config references as the source for exact variable names in the relevant subsystem.

Current implementation caveats

  1. Naming is inconsistent. Repository name (fuy), current product name (Dvange) and a fuymedia.org privacy URL coexist. Resolve naming before a formal release/brand migration.
  2. The product surface is very broad. Do not assume every schema model represents a finished or production-tested screen; verify each user flow independently.
  3. There are multiple data/storage technologies. Clearly define ownership between Prisma/PostgreSQL, Supabase and S3-compatible storage paths.
  4. Sensitive fields require server enforcement. Trust, verification, bans, payments, moderation and privacy cannot safely be client-authoritative.
  5. Mobile permissions are extensive. Review them against actual usage and store-policy requirements before release.
  6. Large schema changes require migrations. Avoid relying on destructive schema synchronization against production data.

License

No root license file was identified during this documentation audit. Add an explicit license before open redistribution or external contribution.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages