This project is an Instagram clone with a Flutter frontend and a Django backend. The backend provides RESTful endpoints for managing posts, reels, user profiles, messages, and more. The frontend interacts with these endpoints to create a seamless user experience similar to Instagram. The mobile code is written in a way that allows for easy integration, following Reso Coder's clean architecture strategy, which is based on principles by Robert C. Martin (Uncle Bob).
- Project Structure
- Backend Endpoints
- Frontend Setup
- Backend Setup
- Running the Application
- Contributing
- License
- Demo
instagram_clone/
├── frontend/
│ └──
├── backend/
│ └──
└── README.md
The backend provides several RESTful endpoints to manage the various functionalities of the Instagram clone.
GET /posts/
- List all postsPOST /posts/
- Create a new postGET /posts/{post_id}/
- Retrieve a specific postPUT /posts/{post_id}/
- Update a specific postDELETE /posts/{post_id}/
- Delete a specific post
GET /posts/{post_id}/comments/
- List all comments on a postPOST /posts/{post_id}/comments/
- Add a comment to a postGET /posts/{post_id}/likes/
- List all likes on a postPOST /posts/{post_id}/likes/
- Like a post
GET /reels/
- List all reelsPOST /reels/
- Create a new reelGET /reels/{reel_id}/
- Retrieve a specific reelPUT /reels/{reel_id}/
- Update a specific reelDELETE /reels/{reel_id}/
- Delete a specific reel
GET /reels/{reel_id}/comments/
- List all comments on a reelPOST /reels/{reel_id}/comments/
- Add a comment to a reelGET /reels/{reel_id}/likes/
- List all likes on a reelPOST /reels/{reel_id}/likes/
- Like a reel
GET /users/
- List all usersPOST /users/
- Create a new userGET /users/{user_id}/
- Retrieve a specific user profilePUT /users/{user_id}/
- Update a specific user profileDELETE /users/{user_id}/
- Delete a specific user profile
GET /messages/
- List all messagesPOST /messages/
- Send a new messageGET /messages/{message_id}/
- Retrieve a specific messageDELETE /messages/{message_id}/
- Delete a specific message
POST /checkEmail/
- Check if an email is already registeredPOST /checkCode/
- Verify confirmation codePOST /checkUsername/
- Check if a username is available
To set up the frontend:
- Ensure you have Flutter installed. For installation instructions, visit Flutter's official site.
- Navigate to the frontend directory:
cd frontend
- Install the required dependencies:
flutter pub get
- Run the Flutter application:
flutter run
To set up the backend:
- Ensure you have Python and Django installed. For installation instructions, visit Django's official site.
- Navigate to the backend directory:
cd backend
- Create a virtual environment and activate it:
pip install pipenv pipenv install pipenv shell
- Run the Django development server:
python manage.py runserver
- Start the backend server by following the steps in the Backend Setup section.
- Run the frontend application by following the steps in the Frontend Setup section.
- Open the Flutter app on your emulator or device. The app will connect to the backend server to fetch and display data.
Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure your code follows the project's coding standards.
This project is licensed under the MIT License. See the LICENSE file for more details.
There is a small demo that does not show all the features, but it is enough to showcase some basics and the UI. You can view the demo here.