Skip to content

leothatguy/framez

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Framez

A modern social media mobile application built with React Native and Expo, featuring real-time post sharing, image uploads, and user authentication.

Features

  • πŸ” User Authentication - Firebase Authentication with email/password
  • πŸ“± Post Creation - Share text and images with your network
  • πŸ–ΌοΈ Image Upload - Upload and share photos from your device
  • ❀️ Like System - Like posts with real-time updates
  • πŸ‘€ User Profiles - View and edit your profile
  • πŸ”„ Real-time Feed - Live updates of posts using Firestore listeners
  • πŸ—‘οΈ Post Management - Delete your own posts
  • 🎨 Dark Theme - Sleek black and gold UI design

Tech Stack

  • Framework: React Native with Expo SDK 54
  • Language: TypeScript
  • Navigation: React Navigation (Stack & Bottom Tabs)
  • Backend: Firebase
    • Authentication
    • Firestore Database
    • Storage (for images)
  • State Management: React Context API
  • UI Components: Custom components with consistent theming
  • Date Handling: Day.js with relative time
  • Image Handling: Expo Image Picker
  • Storage: AsyncStorage for auth persistence

Project Structure

framez/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ui/             # Base UI components (Button, Input)
β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”œβ”€β”€ Logo.tsx
β”‚   β”‚   β”œβ”€β”€ PostCard.tsx
β”‚   β”‚   └── ScreenHeader.tsx
β”‚   β”œβ”€β”€ context/            # React Context providers
β”‚   β”‚   └── AuthContext.tsx # Authentication state management
β”‚   β”œβ”€β”€ lib/                # Third-party integrations
β”‚   β”‚   └── firebase.ts     # Firebase configuration
β”‚   β”œβ”€β”€ navigation/         # App navigation
β”‚   β”‚   β”œβ”€β”€ RootNavigator.tsx
β”‚   β”‚   β”œβ”€β”€ stacks/         # Stack navigators
β”‚   β”‚   └── tabs/           # Tab navigators
β”‚   β”œβ”€β”€ screens/            # App screens
β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication screens
β”‚   β”‚   β”œβ”€β”€ CreatePostScreen.tsx
β”‚   β”‚   β”œβ”€β”€ EditProfileScreen.tsx
β”‚   β”‚   β”œβ”€β”€ FeedScreen.tsx
β”‚   β”‚   └── ProfileScreen.tsx
β”‚   β”œβ”€β”€ theme/              # Styling and theming
β”‚   β”‚   β”œβ”€β”€ colors.ts       # Color palette
β”‚   β”‚   └── index.ts
β”‚   └── types/              # TypeScript type definitions
β”œβ”€β”€ assets/                 # Static assets (images, icons)
β”œβ”€β”€ App.tsx                 # App entry point
β”œβ”€β”€ app.json                # Expo configuration
β”œβ”€β”€ package.json
└── tsconfig.json

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v16 or higher)
  • npm or pnpm
  • Expo CLI
  • Firebase Account with a project set up

Installation

  1. Clone the repository

    git clone <repository-url>
    cd framez
  2. Install dependencies

    pnpm install
    # or
    npm install
  3. Set up Firebase

    • Create a Firebase project at Firebase Console
    • Enable Authentication (Email/Password)
    • Create a Firestore Database
    • Set up Firebase Storage
    • Copy your Firebase config credentials
  4. Configure environment variables

    Copy .env.example to .env and fill in your Firebase credentials:

    cp .env.example .env

    Update the .env file with your Firebase configuration:

    EXPO_PUBLIC_FIREBASE_API_KEY="your-api-key"
    EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN="your-auth-domain"
    EXPO_PUBLIC_FIREBASE_PROJECT_ID="your-project-id"
    EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET="your-storage-bucket"
    EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="your-sender-id"
    EXPO_PUBLIC_FIREBASE_APP_ID="your-app-id"
    EXPO_PUBLIC_FIREBASE_MEASUREMENT_ID="your-measurement-id"

Running the App

Development Mode

# Start the Expo development server
pnpm start

# Run on Android
pnpm android

# Run on iOS
pnpm ios

# Run on Web
pnpm web

Using Expo Go

  1. Install Expo Go on your mobile device
  2. Scan the QR code from the terminal
  3. The app will load on your device

Firebase Setup

Firestore Collections

The app uses the following Firestore structure:

posts collection

{
  authorId: string,          // User UID
  authorName: string,        // Display name
  authorAvatar: string,      // Profile photo URL
  text: string,              // Post content
  imageUrl: string | null,   // Uploaded image URL
  likes: string[],           // Array of user UIDs who liked
  createdAt: Timestamp       // Server timestamp
}

Storage Structure

Images are stored in Firebase Storage at:

posts/{userId}/{timestamp}

Security Rules

Make sure to configure appropriate Firestore and Storage security rules for production use.

Key Features Explained

Authentication Flow

  • Unauthenticated users see Sign In/Sign Up screens
  • Authentication state persists using AsyncStorage
  • Authenticated users access the main app (Feed, Create, Profile)

Real-time Updates

  • Posts feed updates in real-time using Firestore listeners
  • Like counts update instantly across all users
  • Profile posts sync automatically

Image Upload

  • Users can pick images from their device library
  • Images are compressed (70% quality) before upload
  • Images are stored in Firebase Storage with unique timestamps

Theme System

  • Consistent dark theme with gold accents
  • Centralized color palette in src/theme/colors.ts
  • Reusable UI components for buttons and inputs

Color Palette

The app uses a sophisticated dark theme with gold accents:

  • Background: Black (#000000) with subtle grays
  • Text: Ivory (#FFFFF0) for primary text
  • Accent: Gold (#FFD700) for highlights and CTAs
  • Borders: Dark gray (#333333)

Scripts

  • pnpm start - Start Expo development server
  • pnpm android - Run on Android device/emulator
  • pnpm ios - Run on iOS device/simulator
  • pnpm web - Run on web browser

Building for Production

This project uses EAS (Expo Application Services) for building and deployment.

Build Configuration

The project is configured with:

  • Android package: com.leonesii.framez
  • EAS Project ID: 5c22002a-2d0b-47cd-b8eb-e1294365ef2b

Create Production Builds

# Android
eas build --platform android

# iOS
eas build --platform ios

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Troubleshooting

Firebase Connection Issues

  • Verify all Firebase credentials in .env
  • Ensure Firebase services (Auth, Firestore, Storage) are enabled
  • Check Firebase Console for error logs

Build Errors

  • Clear cache: expo start -c
  • Reinstall dependencies: rm -rf node_modules && pnpm install
  • Check Node.js version compatibility

Image Upload Failures

  • Verify Firebase Storage rules
  • Check network connectivity
  • Ensure storage bucket is properly configured

License

This project is private and proprietary.

Acknowledgments


Note: This is a development project. Ensure proper security measures, error handling, and testing before deploying to production.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors