Skip to content

AkinCodes/SocialConnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SocialConnect

SocialConnect is a next-gen iOS app designed with MVVM, Clean Architecture, and AI-powered recommendations. It features OAuth2 authentication, Keychain-secured token storage, and end-to-end encryption for privacy. With real-time push notifications (APNs & Firebase Cloud Messaging**), users receive personalized updates. The app leverages Core ML & Firebase MLKit for dynamic content recommendations, while async/await and Combine optimize performance. SocialConnect is built for scalability, security, and intelligent engagement, making it a great mobile experience.


πŸ›  Features

SocialConnect - Key Strengths

Modern iOS Architecture & Best Practices

Clean Architecture (MVVM + Coordinators):

Structured into Presentation, Domain, and Data layers, ensuring maintainability and scalability. Modularization & Code Separation: Organized ViewModels, Use Cases, and Repository pattern, adhering to SOLID principles. Swift Concurrency: Utilizes async/await and Task for smooth, performant asynchronous handling. SwiftUI + UIKit Hybrid: A SwiftUI-first approach, with UIHostingController integration where necessary. Security & Privacy-First Approach

Keychain Integration:

Securely stores authentication tokens and sensitive user data. OAuth2 Authentication: Implements Firebase Auth & Sign In with Apple for secure login flows. End-to-End Encryption (E2EE): Secure messaging and data exchange for private user interactions. Secure Storage: Uses Core Data & UserDefaults with encryption for storing user preferences safely. Networking & Data Layer

Combine & URLSession for Networking:

Efficient, reactive API handling using AnyPublisher and PassthroughSubject. RESTful API Integration: Adopts Decodable models for smooth JSON parsing and integrates with Cloud Firestore. Feature Flags & A/B Testing: Utilizes remote feature toggles to dynamically roll out experimental features. User Experience & Performance

Optimized Collection Views (DiffableDataSource):

Ensures a smooth scrolling experience for content-heavy screens. Push Notifications (Firebase Cloud Messaging): Custom notifications based on user engagement & AI-powered recommendations. Advanced UI Animations (SwiftUI & Core Animation): Enhances user interactions with smooth, elegant animations. AI-Powered Smart Recommendations

Core ML & Firebase MLKit Integration:

Implements Collaborative Filtering & Content-Based Recommendations. Dynamic AI-Powered Feeds: Smartly curates content for "Trending Now" & "Because You Watched…" sections. Robust Testing & CI/CD Pipeline

XCTest & UI Testing:

Strong test coverage with XCTest for SignUp, Login, Profile, and HomeViewModel. Automated CI/CD with GitHub Actions & Fastlane: Streamlined deployment process for TestFlight & App Store releases. SwiftLint & Danger Integration: Enforces clean, maintainable code and best practices. πŸ“‘ Cloud & Backend Infrastructure

Cloud Firestore & Firebase Storage:

Scales seamlessly for real-time updates and multimedia content. Node.js Backend Deployment on Firebase Functions: Secure API handling for messaging, authentication, and real-time updates. GraphQL Integration (for future scalability): Future-proofing backend queries with a flexible GraphQL API structure.


πŸ“Έ Screenshots


πŸ”§ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/AkinCodes/SocialConnect.git 
cd SocialConnect2

2️⃣ Install Dependencies

Ensure you have CocoaPods installed:

pod install

Then, open the .xcworkspace file:

open SocialConnect.xcworkspace

πŸ”₯ Firebase Setup (Required)

πŸ“ 3️⃣ Add GoogleService-Info.plist

  1. Go to Firebase Console.
  2. Select your project (SocialConnect).
  3. Navigate to:
    Project Settings β†’ General β†’ Your Apps
  4. Click "Download GoogleService-Info.plist".
  5. Move the file to:
    SocialConnect/GoogleService-Info.plist
  6. Ensure it contains real values instead of placeholders.

βœ… Example (GoogleService-Info.plist Placeholder)

<key>API_KEY</key>
<string>INSERT_YOUR_API_KEY</string>

<key>CLIENT_ID</key>
<string>INSERT_YOUR_CLIENT_ID</string>

<key>GCM_SENDER_ID</key>
<string>INSERT_YOUR_GCM_SENDER_ID</string>

<key>GOOGLE_APP_ID</key>
<string>INSERT_YOUR_GOOGLE_APP_ID</string>

πŸ“ 4️⃣ Add credentials.plist for OAuth

  1. Go to Google Cloud Console.
  2. Create an OAuth 2.0 Client ID for an iOS app.
  3. Download the .plist file or manually create credentials.plist:
    SocialConnect/credentials.plist

βœ… Example (credentials.plist Placeholder)

<key>CLIENT_ID</key>
<string>INSERT_YOUR_CLIENT_ID</string>

<key>REVERSED_CLIENT_ID</key>
<string>INSERT_YOUR_REVERSED_CLIENT_ID</string>

<key>BUNDLE_ID</key>
<string>INSERT_YOUR_BUNDLE_ID</string>

How to Obtain Your Own Firebase Service Account JSON Go to your Firebase Console β†’ Project Settings β†’ Service Accounts. Click Generate new private key and download the JSON file. Move the file to a secure location in your project directory (e.g., outside the repo). How to Use the JSON Securely Local Development: Store the path in an environment variable:

export GOOGLE_APPLICATION_CREDENTIALS="$HOME/.config/socialconnect-credentials.json" Production Deployment: Use secrets management tools like Google Secret Manager or GitHub Actions Secrets instead of hardcoding it.


πŸ“² Testing Push Notifications (For Reviewers & Recruiters)

This project includes real-time push notifications using Firebase Cloud Messaging (FCM) with support for deep linking β€” so you can send a notification and navigate directly to a specific screen within the app.

To test this feature manually, follow the instructions below.


βœ… Send a Test Notification with curl

You can use the Firebase HTTP v1 API to send a notification using a simple curl command:

curl -X POST "https://fcm.googleapis.com/v1/projects/<YOUR_PROJECT_ID>/messages:send" \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "token": "<YOUR_DEVICE_FCM_TOKEN>",
      "notification": {
        "title": "πŸš€ Push Test from FCM V1",
        "body": "This is a test notification sent via Firebase API V1!"
      },
      "data": {
        "category": "PROFILE"
      }
    }
  }'


Replace the placeholders:
Placeholder	Description
<YOUR_PROJECT_ID>	Your Firebase project ID (e.g., socialconnect-d72ef)
<YOUR_ACCESS_TOKEN>	A valid OAuth 2.0 token generated using a Firebase Service Account
<YOUR_DEVICE_FCM_TOKEN>	The device token shown in Xcode console when the app runs
⚠️ Note: This project does not expose any real tokens for security reasons. You’ll need to set these up in your own Firebase Console.


Deep Link Categories
The app supports smart navigation via the category key in the data payload. Try changing it to:

"category": "PROFILE" β†’ Opens the profile screen

"category": "SETTINGS" β†’ Opens the settings screen

"category": "POST_DETAILS" β†’ Opens a sample post view (if implemented)

This is handled by the DeepLinkHandler in the app via FCM data messages.


---

### πŸ›  Running the Backend Server (Important Instruction for README)
To ensure the app retrieves data correctly, users must start the backend server before running the project.

How to Start the Backend Server
Open Terminal and navigate to the backend folder:

```cd path/to/backend ```
(Replace path/to/backend with the actual path to your backend directory.)

Run the server using Node.js:


```node server.js```

The backend should now be running, and the app will be able to fetch data successfully.

**⚠ Important: Ensure you have Node.js installed before running this command. If you don’t have it, install it from nodejs.org.**

**This instruction is critical for users to receive data on their device or simulator.**

---

### **Ensure `.gitignore` is Configured**
Run:
```sh
git check-ignore -v SocialConnect/GoogleService-Info.plist credentials.plist

If GoogleService-Info.plist or credentials.plist is not ignored, add them to .gitignore:

# Ignore sensitive files
SocialConnect/GoogleService-Info.plist
SocialConnect/credentials.plist

Then commit:

git add .gitignore
git commit -m "Updated .gitignore to ignore sensitive files"
git push origin main

πŸš€ Run the App

Start the project in Xcode:

Cmd + R

If everything is set up correctly, the app should launch without API errors.


Contribution Guidelines

We welcome contributions! Follow these steps:

  1. Fork the repo
  2. Create a feature branch
    git checkout -b feature-new
  3. Commit changes
    git commit -m "Added new feature"
  4. Push & submit a pull request
    git push origin feature-new

Akin Olusanya
πŸŽ“ iOS Engineer | ML Enthusiast | Full-Stack Creator
πŸ“§ workwithakin@gmail.com
πŸ”— LinkedIn
πŸ“ GitHub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors