Syntonic is a premium, real-time mobile chat application built with React Native (Expo) and Node.js (Express). It leverages Socket.io for instant messaging, MongoDB for secure data storage, and Cloudinary for cloud-based media management.
- Real-Time Communication: Zero-delay instant messaging powered by WebSockets via Socket.io.
- Group & Direct Chats: Create channels and converse with multiple users simultaneously.
- Secure Authentication: User registration and login utilizing JWT tokens and Bcrypt password hashing.
- Media Uploads: Cloudinary integration for smooth profile pictures and image uploads.
- Cross-Platform: Operates seamlessly on Android, iOS, and Web.
- Offline Resiliency: Structured local storage using AsyncStorage for persistent auth states.
Here are some screenshots to give a visual overview of the application:
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
| Layer | Technologies | Description |
|---|---|---|
| Frontend | React Native, Expo (SDK 54), Expo Router | Modern navigation and native component rendering |
| Real-Time | Socket.io Client | WebSocket wrapper for live event-driven communication |
| Backend | Node.js, Express | Fast, unopinionated, minimalist web framework |
| Database | MongoDB, Mongoose | NoSQL Document database with schema-based modeling |
| Authentication | JWT, Bcrypt.js | Stateless authorization and secure credential hashing |
| Media | Cloudinary | Cloud-based image storage and optimization |
syntonic/
├── backend/ # Node.js API & Socket.io Server
│ ├── config/ # Database configuration
│ ├── controllers/ # Auth & Message logic controllers
│ ├── modals/ # Mongoose schemas (User, Message, etc.)
│ ├── routes/ # Express route handlers
│ └── index.js # Server entry point
│
├── frontend/ # React Native Expo Mobile App
│ ├── app/ # Expo Router (routes, layouts)
│ ├── assets/ # Static images and icons
│ ├── components/ # Reusable UI components
│ ├── constants/ # Theme styling and configuration
│ ├── context/ # Authentication & socket contexts
│ └── services/ # API request services (Axios)
│
└── screenshots/ # Application previews
- Node.js (v18 or higher recommended)
- Git
- Android Studio / Xcode (for running emulators)
- Open a terminal and navigate to the backend folder:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackend/directory:MONGO_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key PORT=3000
- Start the backend server in development mode:
npm run dev
- Open a new terminal and navigate to the frontend folder:
cd frontend - Install dependencies:
npm install
- Create a
.envfile in thefrontend/directory:# Set this to your local IP address for emulator testing, or the Render URL for production EXPO_PUBLIC_API_URL=http://localhost:3000 EXPO_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloudinary_name EXPO_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_upload_preset
- Run the development server:
npm run start
- Press
a(Android) ori(iOS) to launch the app in an emulator.
The communication between the mobile frontend and backend is driven by real-time events. Below are the key socket events supported:
| Event Name | Type | Payload | Description |
|---|---|---|---|
getConversations |
Emit/Listen | {} / { success, data: [] } |
Fetches all conversations the logged-in user is a participant of. |
newConversation |
Emit/Listen | { type, participants, name, avatar } |
Creates a new direct (direct) or group (group) conversation. |
newMessage |
Emit/Listen | { conversationId, sender: { id, name, avatar }, content, attachment } |
Broadcasts a new chat message to all connected conversation participants. |
getMessages |
Emit/Listen | { conversationId } |
Fetches the full message history for a specific conversation. |
updateProfile |
Emit/Listen | { name, avatar } |
Updates a user's name or avatar, saves it to MongoDB, and returns a new JWT token. |
getContacts |
Emit/Listen | {} |
Retrieves all other registered users in the database to start a conversation. |
{
email: { type: String, required: true, unique: true },
password: { type: String, required: true },
name: { type: String, required: true },
avatar: { type: String, default: "" },
created: { type: Date, default: Date.now }
}{
type: { type: String, enum: ['direct', 'group'], required: true },
name: String,
participants: [{ type: Schema.Types.ObjectId, ref: 'User' }],
lastMessage: { type: Schema.Types.ObjectId, ref: 'Message' },
createdBy: { type: Schema.Types.ObjectId, ref: 'User' },
avatar: { type: String, default: "" },
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now }
}{
conversationId: { type: Schema.Types.ObjectId, ref: 'Conversation', required: true },
senderId: { type: Schema.Types.ObjectId, ref: 'User', required: true },
content: String,
attachment: String,
createdAt: Date, // Managed by mongoose timestamps
updatedAt: Date // Managed by mongoose timestamps
}graph TD
A[React Native / Expo App] -->|HTTPS REST API| B(Express Router)
A -->|WebSocket Connection| C(Socket.io Gateway)
B -->|Mongoose ODM| D[MongoDB Atlas]
C -->|Mongoose ODM| D
A -->|Image Uploads| E[Cloudinary CDN]
E -->|Secure URLs| A





