A modern, minimal CRUD app for making better decisions through structured analysis and option evaluation.
Decision Analyzer helps users organize their thoughts, evaluate options with ratings, and make informed decisions. This frontend provides an intuitive interface for decision management, option evaluation, and administrative oversight.
Live Demo: Deployed on Vercel
- User Authentication - Secure registration and login with JWT tokens
- Decision Management - Create, view, edit, and delete decisions
- Option Evaluation - Add options to decisions with 1-5 rating system
- Admin Dashboard - User management, role promotion, platform statistics
- Role-Based Access - User and admin roles with different permissions
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
- Framework: React 19.2.0
- Build Tool: Vite 7.3.1
- Routing: React Router DOM 6.20.0
- HTTP Client: Axios 1.7.7
- Styling: CSS3 with CSS Variables
- State Management: React Context API
- Authentication: Supabase JWT
- Node.js 16+ and npm/yarn
- Backend API running (or use production URL)
- Supabase account (for authentication)
# Clone the repository
git clone https://github.com/LibraAkaja/Decision-Analysis-Log.git
cd Frontend
# Install dependencies
npm installCreate a .env file in the Frontend directory:
VITE_API_URL=https://decision-analyzer-log-backend.onrender.com/api/v1For local development:
VITE_API_URL=http://localhost:8000/api/v1# Start development server
npm run dev
# Visit http://localhost:5173Authentication:
POST /auth/register- Register new userPOST /auth/login- Login userPOST /auth/refresh- Refresh tokenGET /auth/me- Get current user profilePOST /auth/logout- Logout user
Decisions:
GET /decisions- Get all user decisionsPOST /decisions- Create new decisionGET /decisions/{id}- Get decision with optionsPATCH /decisions/{id}- Update decisionDELETE /decisions/{id}- Delete decision
Options:
POST /options- Add option to decisionGET /options/{decision_id}- Get options for decisionPATCH /options/{id}- Update optionDELETE /options/{id}- Delete option
Admin:
GET /admin/users- Get all usersPATCH /admin/users/{id}/role- Update user roleDELETE /admin/users/{id}- Delete userGET /admin/dashboard- Get platform statistics
- Visit http://localhost:5173 Home page
- Click "Register" Fill form Submit
- Auto-redirects to /dashboard
- Create decision Add options (1-5 rating)
- Edit/delete options and decisions
- Click logout Back to login
- Register as regular user
- (Backend) Promote user to admin role
- Login Can access /admin
- View users, statistics
- Promote/demote users
- Delete users
- Push to GitHub
git push origin main-
Connect to Vercel
- Go to https://vercel.com
- Import the repository
- Set environment variable:
VITE_API_URL=https://decision-analyzer-log-backend.onrender.com/api/v1 - Deploy
-
Verify Deployment
- Keep components focused and reusable
- Use React Context for state management
- Leverage CSS variables for theming
- Handle loading and error states
- Validate form inputs before submission
- Use semantic HTML
This project is part of the Decision Analyzer Log suite.
For issues or questions, contact LibraAkaja or open an issue on GitHub.