Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.
/ flamsg Public archive

FullStack MERN chat web application with real-time messaging, friend system, and responsive design. Developed as university project at Politecnico di Bari for web development education.

License

Notifications You must be signed in to change notification settings

morph-eos/flamsg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FlaMSG - FullStack MERN Chat Web App

License: MIT Node.js React MongoDB WebSocket

FlaMSG is a FullStack MERN (MongoDB, Express, React, Node.js) chat web application developed as a university project at Politecnico di Bari. It provides a simple and functional chat platform for users to engage in real-time conversations with friend requests, chat history, and responsive design.

FlaMSG Preview
Click the image to visit FlaMSG (Live Demo)

πŸ“‹ Table of Contents

✨ Features

  • User Authentication: Users can create accounts and log in securely with password hashing (bcrypt).
  • Friend System: Send friend requests, accept/reject requests, and manage your friend list.
  • Real-Time Chat: Engage in real-time, two-way communication with other users via WebSocket.
  • Message History: View chat history and previous messages stored in MongoDB.
  • Responsive Design: Works seamlessly on both desktop and mobile devices using Bulma CSS.

🌐 Live Demo

Try the Live Demo

This implementation features a fully functional live demo showcasing the complete MERN chat platform capabilities. The demo provides a comprehensive demonstration of the real-time messaging system, friend management, and user authentication features developed as part of the university project at Politecnico di Bari.

Demo URL: https://flamsg.onrender.com

Note: The demo runs on a free hosting tier, so initial loading may take 30-60 seconds as the server spins up from sleep mode.

πŸš€ Tech Stack

Frontend

  • React 18 with Hooks
  • Vite for build system
  • CSS3 for styling
  • WebSocket for real-time communication

Backend

  • Node.js & Express.js
  • MongoDB with Mongoose ODM
  • Socket.io for WebSocket implementation
  • bcryptjs for password hashing
  • CORS and Helmet for security

πŸ“ Project Structure

FlaMSG/
β”œβ”€β”€ index.js                 # Main server file
β”œβ”€β”€ package.json             # Backend dependencies
β”œβ”€β”€ _frontend/               # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Main app component
β”‚   β”‚   β”œβ”€β”€ Main.jsx        # Chat interface
β”‚   β”‚   β”œβ”€β”€ Start.jsx       # Login/signup page
β”‚   β”‚   └── panels/         # Chat components
β”‚   └── package.json        # Frontend dependencies
β”œβ”€β”€ controllers/             # Business logic
β”‚   β”œβ”€β”€ users.js            # User authentication
β”‚   └── friends.js          # Friend management
β”œβ”€β”€ models/                  # Database schemas
β”‚   β”œβ”€β”€ users.js            # User model
β”‚   └── friends.js          # Friend model
└── routes/                  # API endpoints
    β”œβ”€β”€ users.js            # User routes
    └── friends.js          # Friend routes

πŸ”§ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB database (local or cloud)
  • npm or yarn

Backend Setup

# Clone the repository
git clone https://github.com/M04ph3u2/FlaMSG.git
cd FlaMSG

# Install backend dependencies
npm install

# Set up environment variables (see below)
# Create a .env file in the root directory

# Start the backend server
npm run start-server

Frontend Setup

# Install frontend dependencies
npm run install-frontend

# Build the frontend
npm run build-frontend

# For development, you can run both simultaneously
npm run build-all

βš™οΈ Environment Variables

Create a .env file in the root directory with the following variables:

MONGODB_URI=mongodb://localhost:27017/flamsg
# OR for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:[email protected]/flamsg

PORT=3000

Important: Never commit your .env file to version control. The .gitignore already excludes it.

🎯 Usage

  1. Start the application: Run npm run start-server after setting up the environment variables
  2. Register an account: Create a new user account on the login page
  3. Add friends: Search for other users by username and send friend requests
  4. Start chatting: Accept friend requests and start real-time conversations

πŸ”’ Security Notes

⚠️ Educational Project Disclaimer:

This project was created for educational purposes at Politecnico di Bari and is not intended for production use.

Known Limitations:

  • Messages are not encrypted end-to-end
  • Basic cookie-based authentication (educational implementation)
  • No privacy policy or data protection compliance
  • Limited input validation and rate limiting

What's Secure:

  • Passwords are properly hashed using bcryptjs
  • MongoDB URI is stored in environment variables
  • CORS and Helmet.js provide basic security headers
  • No sensitive data is committed to version control

Recommendation: Use this project as a learning reference. For production applications, implement proper JWT authentication, input validation, rate limiting, and encryption.

πŸ“„ License

This project is open-source and available under the MIT License.

πŸ“ˆ Project History

πŸ“… Development Timeline

June-July 2023 - Initial Development Period

  • Project developed as university coursework at Politecnico di Bari
  • Full-stack MERN implementation with real-time chat features
  • WebSocket integration for live messaging
  • Friend request system and chat functionality
  • Original development completed during summer semester

November 8, 2023 - GitHub Upload & Organization

  • Project uploaded to GitHub from local development environment
  • Repository structure organized and .gitignore configured
  • Migration from Replit to Render hosting platform
  • Bug fixes and translation improvements
  • All development history compressed into single upload date

March 4, 2024 - Final Updates & Archive

  • Final README updates and documentation improvements
  • Project submitted as completed coursework
  • Repository archived after academic submission
  • Live deployment maintained on Render platform

July 21, 2025 - Documentation Revival

  • Repository un-archived for portfolio purposes
  • Comprehensive documentation overhaul
  • Added detailed setup instructions and project structure
  • Enhanced security notes and development context
  • Professional README for portfolio presentation

πŸŽ“ Academic Context

This project was developed as part of the curriculum at Politecnico di Bari during the 2023 academic year, focusing on full-stack web development using the MERN stack with real-time communication features.

πŸ™ Acknowledgments

Special thanks to my university "Politecnico di Bari" and Prof. Antonio Ferrara for the guidelines on the MERN Fullstack development.


Enjoy using FlaMSG! Feel free to reach out with any questions or feedback.

About

FullStack MERN chat web application with real-time messaging, friend system, and responsive design. Developed as university project at Politecnico di Bari for web development education.

Topics

Resources

License

Stars

Watchers

Forks