Welcome to Samishi – the ultimate social media platform where cat owners can connect, share adorable moments, and interact with fellow feline enthusiasts! This project is built with love using React + Vite on the frontend and Django + Django REST Framework on the backend.
- Create Posts: Upload multiple images with captions of your adorable cat moments.
- Image Previews: Get instant previews of your images before posting.
- Likes & Comments: Interact with posts by liking and commenting.
- User Authentication: Secure sign-up, login, and user detail management.
- Responsive Design: Enjoy a smooth experience on both desktop and mobile.
- Cat-tastic Interactions: Connect with other cat lovers and share the love!
-
Frontend: - React + Vite
- Tailwind CSS for styling
-
Backend: - Django & Django REST Framework
- SQLite (default) – feel free to configure your preferred database
- Pillow for image processing
- Node.js & npm
- Python 3.x
- pip
-
Clone the repository:
git clone https://github.com/Spade-M/Samishi.git cd Samishi/frontend
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
Your frontend should now be running on
http://localhost:3000
.
-
Navigate to the backend folder:
cd ../backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Run the development server:
python manage.py runserver
Your backend should now be running on
http://localhost:8000
.
Samishi/
├── backend/ # Django backend
│ ├── samishi/ # Django project settings
│ ├── posts/ # App for posts, likes, and comments
│ │ ├── models.py # Post, PostImage, Like, Comment models
│ │ ├── serializers.py # Serializers for Post and related models
│ │ ├── views.py # API views for posts, likes, comments, etc.
│ │ └── urls.py # URL configuration for the posts app
│ └── manage.py
└── frontend/ # React + Vite frontend
├── src/
│ ├── components/ # UI components including Posts
│ ├── App.jsx # Main app component
│ └── main.jsx # Entry point for Vite
└── package.json
Here are some key endpoints:
User Authentication:
POST /api/signup/
– Sign upPOST /api/login/
– LoginGET /api/user/
– Get current user detailsPOST /api/logout/
– Logout
Posts:
GET /api/posts/
– List all posts (ordered by creation time)POST /api/posts/
– Create a new post (with multiple images)DELETE /api/posts/<pk>/
– Delete a post (only by owner)
Interactions:
POST /api/posts/<pk>/like/
– Toggle like/unlike for a postPOST /api/posts/<pk>/comments/
– Add a comment to a post
We love contributions from the community! If you have ideas to improve Samishi Community or found a bug, please feel free to open an issue or create a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes.
- Push your branch and open a pull request.
This project is licensed under the MIT License.
Stay pawsome and happy coding! 🐾😸