diff --git a/README.md b/README.md index a78a281..3209498 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,9 @@ |---------------|--------------------------| | 🖼 Frontend | React | | 🚀 Backend | Spring Boot (Java) | -| 🐘 Database | MS SQL Server | +| 🐘 Database | MS SQL Server | | 🛡 Security | JWT Authentication | +| 🛡 File Storage| AWS S3 | | 🐳 DevOps | Docker & Docker Compose | | 🔁 CI/CD | GitHub Actions | @@ -29,59 +30,66 @@ ## 📂 Project Structure -TODO +### 📦 Backend Structure + +```bash +backend/ +├── mvnw +├── mvnw.cmd +├── pom.xml +├── src/ +│ ├── main/ +│ │ ├── java/hr/algebra/socialnetwork/ +│ │ │ ├── AlgebraSocialNetworkApplication.java +│ │ │ ├── config/ # Configuration classes (CORS, Swagger, AWS, etc.) +│ │ │ ├── controller/ # REST Controllers +│ │ │ ├── dto/ # Data Transfer Objects +│ │ │ ├── exception/ # Exception handling +│ │ │ ├── mapper/ # DTO mappers +│ │ │ ├── model/ # JPA Entities +│ │ │ ├── payload/ # Request payloads +│ │ │ ├── repository/ # Spring Data Repositories +│ │ │ ├── s3/ # AWS S3 Service +│ │ │ ├── security/ # Security configuration +│ │ │ ├── service/ # Business logic services +│ │ │ └── validation/ # Custom annotations & validators ``` -algebra-social-network/ -├── frontend/ # React app -├── backend/ # Spring Boot app -│ └── src/ -├── .github/workflows/ # GitHub Actions CI/CD //TDOD -├── docker-compose.yml //TODO -└── README.md -``` - ---- - -## 🔐 Authentication Endpoints - -| Method | Endpoint | Description | -|--------|-----------------------------|----------------------| -| POST | `/api/v1/auth/register` | Register a new user | -| POST | `/api/v1/auth/login` | Login and get token | - ---- - -## 👤 User Endpoints - -| Method | Endpoint | Description | -|--------|-----------------------------------|--------------------| -| PUT | `/api/v1/users/{userId}` | Update user info | -| DELETE | `/api/v1/users/{userId}` | Delete user | -| GET | `/api/v1/users` | List all users | ---- - -## 📝 Post Endpoints - -| Method | Endpoint | Description | -|--------|------------------------------------------|-------------------------| -| GET | `/api/v1/posts` | Get all posts | -| POST | `/api/v1/posts` | Create new post | -| POST | `/api/v1/posts/{id}/rate` | Rate a post | -| POST | `/api/v1/posts/{id}/comments` | Add comment to post | -| GET | `/api/v1/posts/{postId}/comments` | Get comments for post | -| GET | `/api/v1/posts/{id}` | Get post by ID | -| GET | `/api/v1/posts/user/{userId}` | Get posts by user | - ---- - -## 🤝 Friends Endpoints - -| Method | Endpoint | Description | -|--------|------------------------------------------|------------------------------| -| POST | `/api/v1/friends/request/{userId}` | Send friend request | -| POST | `/api/v1/friends/decline/{requestId}` | Decline friend request | -| POST | `/api/v1/friends/approve/{requestId}` | Approve friend request | -| GET | `/api/v1/friends/requests` | View friend requests | -| DELETE | `/api/v1/friends/remove/{userId}` | Remove a friend | +### 📦 Frontend Structure + +```bash +frontend/src/ +├── App.jsx +├── assets/ # Static assets (images, svg, etc.) +│ └── alg_wd_blur.svg +├── components/ +│ ├── common/ # Reusable components (input, theme, toaster) +│ ├── layout/ # Layout components (navbar, sidebar) +│ ├── posts/ # Post-related UI +│ └── profile/ # Profile editing components +├── context/ +│ └── AuthContext.jsx # Authentication context +├── index.css +├── main.jsx +├── pages/ # Route-level pages +│ ├── EditProfilePage.jsx +│ ├── FriendRequestsPage.jsx +│ ├── FriendsPage.jsx +│ ├── HomePage.jsx +│ ├── LoginPage.jsx +│ ├── ProfilePage.jsx +│ ├── RegisterPage.jsx +│ └── StudentsPage.jsx +├── routes/ +│ └── PrivateRoute.jsx # Protected route wrapper +├── services/ # API calls and service layer +│ ├── authService.js +│ ├── friendsService.js +│ ├── postsService.js +│ └── usersService.js +├── styles/ +│ └── App.css +└── utils/ + └── utils.js # Helper functions| +```