refactor: convert frontend from submodule to true monorepo
Convert frontend from Git submodule to a regular monorepo directory for simplified development workflow. Changes: - Remove frontend submodule tracking (mode 160000 gitlink) - Add all frontend source files directly to main repository - Remove frontend/.git directory - Update CLAUDE.md to clarify true monorepo structure - Update Frontend Architecture documentation (React Router v6, Socket.IO, Leaflet, ErrorBoundary) Benefits of Monorepo: - Single git clone for entire project - Unified commit history - Simpler CI/CD pipeline - Easier for new developers - No submodule sync issues - Atomic commits across frontend and backend Frontend Files Added: - All React components (MapView, ErrorBoundary, TaskList, SocialFeed, etc.) - Context providers (AuthContext, SocketContext) - Complete test suite with MSW - Dependencies and configuration files Branch Cleanup: - Using 'main' as default branch (develop deleted) - Frontend no longer has separate Git history 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
CLAUDE.md
10
CLAUDE.md
@@ -29,15 +29,21 @@ The backend follows a standard Express MVC pattern:
|
||||
- `middleware/auth.js`: JWT authentication middleware using `x-auth-token` header
|
||||
|
||||
### Frontend Architecture
|
||||
React SPA using React Router v5:
|
||||
React SPA using React Router v6:
|
||||
- `App.js`: Main router with client-side routing
|
||||
- `context/AuthContext.js`: Global authentication state management
|
||||
- `components/`: Feature components (MapView, TaskList, SocialFeed, Profile, Events, Rewards, Premium, Login, Register, Navbar)
|
||||
- `context/SocketContext.js`: Socket.IO real-time connection management
|
||||
- `components/`: Feature components (MapView, TaskList, SocialFeed, Profile, Events, Rewards, Premium, Login, Register, Navbar, ErrorBoundary)
|
||||
- Real-time updates via Socket.IO for events, posts, and tasks
|
||||
- Interactive map with Leaflet for street visualization
|
||||
- Comprehensive error handling with ErrorBoundary
|
||||
|
||||
Authentication flow: JWT tokens stored in localStorage and sent via `x-auth-token` header on all API requests.
|
||||
|
||||
Frontend proxies API requests to `http://localhost:5000` in development.
|
||||
|
||||
**Note:** This is a true monorepo - both frontend and backend are tracked in the same Git repository for simplified development and deployment.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Backend
|
||||
|
||||
Reference in New Issue
Block a user