... cd ~/OneDrive/Desktop/2025-rtt-54/Pro-Tasker/pro-tasker-frontend
cat > README.md << 'EOF'
A full-stack MERN (MongoDB, Express, React, Node.js) task management application that helps users organize their work through projects and tasks.
Frontend: https://pro-tasker-frontend-lpxn.onrender.com Backend API: https://pro-tasker-backend-1-b0pc.onrender.com
- User Authentication: Secure registration and login with JWT tokens
- Project Management: Create, view, and delete projects
- Task Management: Add, view, and delete tasks within projects
- Protected Routes: Authentication required for project/task access
- Persistent Sessions: Login state maintained across browser sessions
- React 18 with TypeScript
- React Router v6 for routing
- Axios for API requests
- Vite for build tooling
- Tailwind CSS for styling
- Node.js & Express
- MongoDB with Mongoose ODM
- JWT for authentication
- bcrypt for password hashing
- CORS for cross-origin requests
pro-tasker-frontend/
├── src/
│ ├── clients/
│ │ └── api.ts # Axios configuration with interceptors
│ ├── components/
│ │ └── Navbar.tsx # Navigation component
│ ├── context/
│ │ └── AuthProvider.tsx # Global authentication state
│ ├── pages/
│ │ ├── HomePage.tsx # Landing page
│ │ ├── AuthPage.tsx # Login/Register forms
│ │ ├── ProjectsPage.tsx # Project list and creation
│ │ └── ProjectDetailsPage.tsx # Task management
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ ├── App.tsx # Main app with routing
│ └── main.tsx # Application entry point
├── .env # Environment variables
└── package.json # Dependencies and scripts
- Node.js (v18 or higher)
- npm or yarn
Create a .env file in the root directory:
VITE_BACKEND_URL=http://localhost:4000/api
For production, use your deployed backend URL.
npm installnpm run devApplication will be available at http://localhost:5173
npm run build- User registers with username, email, and password
- Password is hashed with bcrypt on the backend
- User logs in with email and password
- Backend validates credentials and returns JWT token
- Token stored in localStorage on client
- Axios interceptor adds token to all subsequent requests
- Protected routes check for valid token before rendering
Axios instance with:
- Base URL from environment variable
- Request interceptor for automatic token injection
- Response interceptor for 401 error handling
Provides global authentication state:
user: Current logged-in user objecttoken: JWT authentication tokenlogIn(): Login functionregister(): Registration functionlogOut(): Logout function (clears state and localStorage)
| Path | Component | Access | Description |
|---|---|---|---|
/ |
HomePage | Public | Landing page |
/auth |
AuthPage | Public | Login/Register |
/projects |
ProjectsPage | Protected | Project list |
/projects/:id |
ProjectDetailsPage | Protected | Task management |
Protected routes redirect unauthenticated users to /auth.
Built with Tailwind CSS utility classes for:
- Dark theme UI
- Responsive design
- Form styling
- Button states
- Layout components
Deployed on Render as a Static Site:
- Connect GitHub repository
- Set build command:
npm install && npm run build - Set publish directory:
dist - Add environment variable:
VITE_BACKEND_URL - Deploy automatically on git push
Backend code available at: https://github.com/equezada327/pro-tasker-backend
Enrique Quezada
- GitHub: @equezada327
This project was created as a capstone project for a software engineering bootcamp. EOF