How thanthanwinn/mysocial works
This repository contains a Spring-backed social application and its React client. Users register or log in, then browse and manage posts, profiles, relationships, messages, notifications, and to-do lists. The client routes authenticated users to these features and calls the backend through HTTP services; chat also has a WebSocket-related backend subsystem in the tree. The excerpts show client routing and several client-to-service calls, but not backend controller implementations, so backend links are limited to the API families visible in client URLs.
Main entry points: App.tsx App routes · controller Spring HTTP API · user.service.ts User and post API · ProfileComponent.tsx Profile
Components 27
React client
- App routes
spring-react-project/src/App.tsx - Login and register
spring-react-project/src/components/LoginComponent.tsx - Header
spring-react-project/src/components/HeaderComponent.tsx - Weather widget
spring-react-project/src/components/WeatherComponent.tsx
Social features
- Home feed
spring-react-project/src/components/HomeComponent.tsx - Post list
spring-react-project/src/components/PostListComponent.tsx - Post card
spring-react-project/src/components/PostCardComponent.tsx - Post management
spring-react-project/src/service/usePostManagement.ts - Profile
spring-react-project/src/components/ProfileComponent.tsx - Profile editor
spring-react-project/src/components/EditProfileComponent.tsx - Friends
spring-react-project/src/components/FriendsComponent.tsx - Inbox
spring-react-project/src/components/MessageComponent.tsx - Conversation
spring-react-project/src/components/ChatConversation.tsx - Notifications
spring-react-project/src/components/NotificationComponent.tsx - To-do list
spring-react-project/src/components/TodoListComponent.tsx
Spring backend
- Spring HTTP API
spring-project/src/main/java/org/example/springproject/controller - WebSocket chat
spring-project/src/main/java/org/example/springproject/config/WebSocketConfig.java - Authentication security
spring-project/src/main/java/org/example/springproject/config/SecurityConfig.java
Client foundations
- Auth service
spring-react-project/src/service/auth.service.ts - User and post API
spring-react-project/src/service/user.service.ts - Relations API
spring-react-project/src/service/relations.service.ts - Message API
spring-react-project/src/service/message.service.ts - To-do API
spring-react-project/src/service/todo.service.ts - User context
spring-react-project/src/components/ContextProvider.tsx - Theme context
spring-react-project/src/components/ThemeContext.tsx - DTO types
spring-react-project/src/ds/dto.ts
Other components
- User
Connections 38
- User → App routes: uses
- App routes → Login and register: routes to
spring-react-project/src/App.tsx - App routes → Home feed: routes to
spring-react-project/src/App.tsx - App routes → Profile: routes to
spring-react-project/src/App.tsx - App routes → Friends: routes to
spring-react-project/src/App.tsx - App routes → Conversation: routes to
spring-react-project/src/App.tsx - App routes → Inbox: routes to
spring-react-project/src/App.tsx - App routes → Notifications: routes to
spring-react-project/src/App.tsx - App routes → Profile editor: routes to
spring-react-project/src/App.tsx - App routes → Header: renders
spring-react-project/src/App.tsx - App routes → User context: provides
spring-react-project/src/App.tsx - App routes → Theme context: provides
spring-react-project/src/App.tsx - Login and register → Auth service: calls
spring-react-project/src/App.tsx - Home feed → Post list: renders
spring-react-project/src/components/HomeComponent.tsx - Post list → Post card: renders
spring-react-project/src/components/PostListComponent.tsx - Post list → Post management: uses
spring-react-project/src/components/PostListComponent.tsx - Post management → User and post API: calls
spring-react-project/src/service/usePostManagement.ts - Post card → User and post API: fetches comments
spring-react-project/src/components/PostCardComponent.tsx - Profile → User and post API: loads profile
spring-react-project/src/components/ProfileComponent.tsx - Profile → Relations API: loads friends
spring-react-project/src/components/ProfileComponent.tsx - Profile → Post card: renders
spring-react-project/src/components/ProfileComponent.tsx - Profile editor → User and post API: updates profile
spring-react-project/src/components/EditProfileComponent.tsx - Friends → Relations API: calls
spring-react-project/src/components/FriendsComponent.tsx - Inbox → Message API: calls
spring-react-project/src/components/MessageComponent.tsx - Conversation → Message API: calls
spring-react-project/src/components/ChatConversation.tsx - Notifications → User and post API: fetches
spring-react-project/src/components/NotificationComponent.tsx - To-do list → To-do API: calls
spring-react-project/src/components/TodoListComponent.tsx - App routes → Weather widget: renders via layout
- Auth service → Spring HTTP API: HTTP auth requests
spring-react-project/src/service/auth.service.ts - User and post API → Spring HTTP API: HTTP user and post requests
spring-react-project/src/service/user.service.ts - Relations API → Spring HTTP API: HTTP relation requests
spring-react-project/src/service/relations.service.ts - Message API → Spring HTTP API: HTTP message requests
spring-react-project/src/service/message.service.ts - To-do API → Spring HTTP API: HTTP requests
- Conversation → WebSocket chat: chat transport
- Spring HTTP API → Authentication security: secured by
- User context → DTO types: types user state
spring-react-project/src/components/ContextProvider.tsx - Message API → DTO types: uses types
spring-react-project/src/service/message.service.ts - Auth service → DTO types: uses types
spring-react-project/src/service/auth.service.ts