A full-stack Instagram clone built with Spring Boot and NextJS.
- View feed of posts
- Create new posts
- Like and comment on posts
- View user profiles
- Responsive design
- Java Spring Boot
- Spring Data JPA
- H2 Database (for development)
- RESTful API
- NextJS
- React
- Tailwind CSS
- Axios for API calls
- Java 17 or higher
- Node.js 16 or higher
- npm or yarn
- Navigate to the backend directory:
cd instagram-clone/backend
- Build and run the Spring Boot application:
./mvnw spring-boot:run
The backend server will start on http://localhost:8080.
- Navigate to the frontend directory:
cd instagram-clone/frontend
- Install dependencies:
npm install
# or
yarn install
- Run the development server:
npm run dev
# or
yarn dev
The frontend application will be available at http://localhost:3000.
- GET /api/users - Get all users
- GET /api/users/{id} - Get user by ID
- GET /api/users/username/{username} - Get user by username
- POST /api/users - Create a new user
- PUT /api/users/{id} - Update a user
- DELETE /api/users/{id} - Delete a user
- GET /api/posts - Get all posts
- GET /api/posts/{id} - Get post by ID
- GET /api/posts/user/{userId} - Get posts by user ID
- POST /api/posts - Create a new post
- PUT /api/posts/{id} - Update a post
- DELETE /api/posts/{id} - Delete a post
- GET /api/comments/post/{postId} - Get comments for a post
- POST /api/comments/post/{postId} - Add a comment to a post
- PUT /api/comments/{commentId} - Update a comment
- DELETE /api/comments/{commentId} - Delete a comment
- GET /api/likes/post/{postId} - Get likes info for a post
- POST /api/likes/post/{postId}/like - Like a post
- DELETE /api/likes/post/{postId}/unlike - Unlike a post