Memories is a full-stack social media application built with the MERN stack (MongoDB, Express, React, Node.js). It provides a platform for users to post, share, and interact with interesting events and memories from their lives. The application features a clean, modern UI built with Material-UI and is powered by a robust REST API.
| Home Page | Post Detail |
|---|---|
![]() |
![]() |
| Login | Sign Up |
![]() |
![]() |
| Create Memory | Comment on Post |
![]() |
![]() |
- User Authentication: Secure user registration and login system using JSON Web Tokens (JWT).
- CRUD Operations: Full Create, Read, Update, and Delete functionality for posts.
- Rich Content: Posts include a title, message, tags, and an image upload feature (Base64).
- Social Interaction: Users can like and comment on posts created by others.
- Powerful Search: Search for memories by title.
- Pagination: Efficiently browse through a large number of posts with server-side pagination.
- Detailed View: Click on any post to view its dedicated details page.
- Responsive Design: A user-friendly and responsive interface that works on various screen sizes.
- Node.js: JavaScript runtime environment.
- Express.js: Web application framework for Node.js.
- MongoDB: NoSQL database for storing application data.
- Mongoose: Object Data Modeling (ODM) library for MongoDB and Node.js.
- JSON Web Tokens (JWT): For secure user authentication and authorization.
- bcrypt: Library for hashing user passwords.
- CORS: Middleware for enabling Cross-Origin Resource Sharing.
- Dotenv: For managing environment variables.
- React: JavaScript library for building user interfaces.
- Redux: State management library with Redux Thunk for asynchronous actions.
- React Router: For client-side routing and navigation.
- Material-UI: A popular React UI framework for faster and easier web development.
- Axios: Promise-based HTTP client for making API requests.
- Moment.js: For parsing, validating, manipulating, and displaying dates and times.
Follow these instructions to set up and run the project on your local machine.
- Node.js (v14 or later recommended)
- npm or Yarn
- MongoDB installed and running, or a MongoDB Atlas account.
-
Clone the repository:
git clone https://github.com/akshay-bharadva/memories cd memories -
Set up the Backend:
- Navigate to the backend directory:
cd back - Create a
.envfile in thebackdirectory and add your environment variables. See the Environment Variables section below for details. - Install backend dependencies:
npm install
- Start the backend server (runs on
http://localhost:5001by default):npm start
- Navigate to the backend directory:
-
Set up the Frontend:
- In a new terminal, navigate to the frontend directory:
cd front - Install frontend dependencies:
npm install
- Start the frontend development server (runs on
http://localhost:3000):npm start
- In a new terminal, navigate to the frontend directory:
The application should now be running. Open your browser and navigate to http://localhost:3000.
The backend requires a .env file for configuration. Create a file named .env in the back directory with the following content:
# The connection string for your MongoDB database (local or Atlas)
MONGODB_CONNECTION_URL=mongodb://localhost:27017/memories
# The port for the backend server to run on
SERVER_PORT=5001Note: The application uses a hardcoded JWT secret ('test'). For a production environment, it is highly recommended to replace this with a strong, secret key stored in your .env file.





