Welcome to chatEasy, the instant messaging application designed to break down language barriers and bring friends from different corners of the world closer together. With real-time translation for messages and UI elements, chatEasy ensures a seamless communication experience where language is no longer a hurdle.
The purpose of chatEasy is to allow users from different nations to communicate effortlessly. By abstracting the translation process, users can send messages and interact with the application in their native language while receiving responses in a language they understand. This fosters genuine connections and friendships across diverse linguistic backgrounds.
The project follows a standard Next.js application structure with additional directories for firebase integration and organization:
/project-nimbus
βββ app
β βββ android-chrome-192x192.png
β βββ android-chrome-512x512.png
β βββ api
β β βββ auth
β β β βββ [...nextauth]
β β β βββ route.ts
β β βββ search-users
β β βββ route.ts
β βββ apple-touch-icon.png
β βββ assets
β β βββ img
β β βββ g-icon.png
β β βββ icon.svg
β β βββ jane.png
β β βββ john.png
β β βββ logo-dark.png
β β βββ logo-light.png
β β βββ phone-chat.png
β β βββ wallpaper-dark.svg
β β βββ wallpaper-light.svg
β βββ (auth)
β β βββ signin
β β β βββ page.tsx
β β βββ signup
β β βββ page.tsx
β βββ chat
β β βββ page.tsx
β βββ favicon-16x16.png
β βββ favicon-32x32.png
β βββ favicon.ico
β βββ globals.css
β βββ (invitation)
β β βββ accept-invite
β β β βββ page.tsx
β β βββ invite
β β βββ page.tsx
β βββ layout.tsx
β βββ page.tsx
β βββ site.webmanifest
βββ components
β βββ ActionButton.tsx
β βββ AuthCard.tsx
β βββ AvatarUpload.tsx
β βββ BlockButton.tsx
β βββ ChatHeader.tsx
β βββ ChatItem.tsx
β βββ ChatList.tsx
β βββ ChatRoom.tsx
β βββ CombinedChatPage.tsx
β βββ common
β β βββ ChatIllustration.tsx
β β βββ Dropdown.tsx
β β βββ Logo.tsx
β βββ CreateNewChat.tsx
β βββ EmojiPicker.tsx
β βββ ErrorAlert.tsx
β βββ InputField.tsx
β βββ InvitationCard.tsx
β βββ LoadingSpinner.tsx
β βββ MessageInput.tsx
β βββ MessageList.tsx
β βββ PasswordField.tsx
β βββ PreferredLanguageSelect.tsx
β βββ SearchBar.tsx
β βββ SessionProvider.tsx
β βββ StatusMessage.tsx
β βββ ThemeProvider.tsx
β βββ ThemeSwitcher.tsx
β βββ TranslucentCard.tsx
β βββ UserDetailsSidebar.tsx
β βββ UserInfo.tsx
β βββ UserProfile.tsx
βββ constants
β βββ index.ts
βββ lib
β βββ auth.ts
β βββ email.ts
β βββ firebaseAdmin.ts
β βββ firebaseClient.ts
β βββ firebaseStorage.ts
β βββ upload.ts
βββ next.config.js
βββ next.config.mjs
βββ package.json
βββ package-lock.json
βββ postcss.config.mjs
βββ README.md
βββ store
β βββ useChatStore.ts
β βββ useUserStore.ts
βββ tailwind.config.ts
βββ tsconfig.json
βββ types
βββ index.ts
βββ next-auth.d.ts-
app Main application directory with source code.
-
api: Contains server-side routes, including authentication and user search APIs utilizing Firebase. (auth): Pages for sign-in and sign-up. chat/page.tsx: Chat interface for real-time messaging with Firebase.
-
components Reusable UI components for the application, such as ChatHeader, MessageList, and EmojiPicker, all designed to interact with Firebase for data handling.
-
lib Utility functions and Firebase configurations:
-
firebaseAdmin.ts, firebaseClient.ts: Manage server and client-side Firebase interactions.
-
store State management for chat and user data, leveraging Firebase for real-time updates.
-
types Type definitions for TypeScript, including those for Firebase and authentication.
-
Root Files Configuration files for Next.js and Firebase setup, including package.json and tailwind.config.ts for styling.
We are currently utilizing Firebase for real-time chat functionality and user authentication, ensuring a clean and scalable codebase.
Please note that the project structure may change as development is ongoing. Always refer to the most recent version of the project for the accurate structure.
chatEasy tackles the language barrier challenge with these innovative solutions:
-
Real-Time Translation: Messages are instantly translated as they are sent and received, ensuring smooth communication without delays.
-
Localized UI: The application interface adapts to the user's preferred language, making it intuitive and user-friendly.
-
Seamless Integration: The translation service is seamlessly integrated into the backend, abstracting the complexity from the end-user.
By leveraging cutting-edge AI and machine learning technologies, chatEasy provides an experience where users can interact as if they are speaking the same language, regardless of their geographical and linguistic differences.
A sample of out tentative user interface:
This is a Next.js project bootstrapped with create-next-app.
This overview documents the process of fine-tuning and training a Swahili-English translation model. The model was fine-tuned and trained four times on a Google Cloud Platform (GCP) notebook instance, utilizing a Virtual Machine (VM) with 8 vCPUs and 32 GB of RAM. After completing the training, the model was successfully deployed on Hugging Face for public use.
- Platform: Google Cloud Platform (GCP)
- Instance Type: Compute Engine VM
- vCPUs: 8
- RAM: 32 GB
- Notebook Instance: GCP AI Platform Notebooks
- Collected and preprocessed a dataset of Swahili-English text pairs for training.
- Used standard text preprocessing techniques such as tokenization, padding, and cleaning of the dataset to ensure high-quality input.
- Chose a pre-trained transformer-based model suitable for translation tasks.
- The base model was selected for its effectiveness in low-resource language pairs.
- Fine-tuned the model on the Swahili-English dataset in four iterations.
- Adjusted hyperparameters such as learning rate, batch size, and epochs to optimize performance.
- Utilized the GCP VM with 8 vCPUs and 32 GB RAM for efficient processing during training.
- Once the final iteration was completed, the model was exported and prepared for deployment.
- The model was then uploaded and deployed on Hugging Face's model hub.
The fine-tuned Swahili-English translation model is publicly available on Hugging Face and can be accessed through the following link:
Swahili-English Translation Model on Hugging Face
To use the model, you can either download it from Hugging Face or use the Inference API provided on the Hugging Face model page. Below is a sample Python code snippet for using the model via the Hugging Face Transformers library:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Bildad/Swahili-English_Translation")
model = AutoModelForSeq2SeqLM.from_pretrained("Bildad/Swahili-English_Translation")
# Sample translation
input_text = "Habari, unafanyaje?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(f"Translated text: {translated_text}")To run the chateasy application locally:
- Install dependencies
npm install- create a .env file and populate it with your firebase credentials as follows
#From Firebase Console
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
#For Google Translate API
NEXT_PUBLIC_GOOGLE_TRANSLATE_API_KEY=<GET AN API KEY FROM GOOGLE CLOUD CONSOLE>
NEXT_PUBLIC_GOOGLE_TRANSLATE_API_URL=https://translation.googleapis.com/language/translate/v2
- Run the development server
npm run devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.







