A fully responsive React.js frontend for tracking daily expenses with AWS Cognito authentication, analytics, and spending limits.
- Authentication: AWS Cognito integration with sign up, login, and logout
- Expense Management: Add, edit, delete, and filter expenses
- Analytics: Visual charts showing spending patterns (bar, pie, line charts)
- Spending Limits: Set monthly limits with alerts when approaching/exceeding
- Responsive Design: Mobile-first design using Tailwind CSS
- Real-time Updates: Automatic refresh of data after operations
Copy .env.example to .env.local and fill in your AWS Cognito details:
```bash cp .env.example .env.local ```
Install AWS Amplify:
```bash npm install aws-amplify @aws-amplify/ui-react ```
Configure Amplify in your app by importing the config:
```javascript import { Amplify } from 'aws-amplify' import amplifyConfig from './amplify-config'
Amplify.configure(amplifyConfig) ```
```bash npm install ```
```bash npm run dev ```
```bash npm run build npm start ```
The app expects the following API endpoints:
GET /expenses- Get user expensesPOST /expenses- Create new expensePUT /expenses/:id- Update expenseDELETE /expenses/:id- Delete expenseGET /spending-limit- Get spending limitPUT /spending-limit- Update spending limit
All requests include:
Authorization: Bearer <jwt-token>X-User-ID: <user-id>
This app is ready for deployment on Vercel:
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Frontend: Next.js 14 with App Router
- Authentication: AWS Cognito via Amplify
- Styling: Tailwind CSS with shadcn/ui components
- Charts: Custom Canvas-based charts (can be replaced with Chart.js)
- State Management: React hooks and context
- API: RESTful API with AWS API Gateway integration