Modern client-side application for managing study materials with cursor pagination.
- 🎨 Modern Design - Minimalist interface using Tailwind CSS
- 📱 Responsive - Optimized for all devices
- ⚡ Cursor Pagination - Efficient loading of large lists
- 🔄 Auto Loading - Content loading on scroll
- ➕ Task Creation - Modal window for adding new tasks
- 🗑️ Task Deletion - Safe deletion with confirmation
- 📖 Detailed View - Separate page with Markdown content
- 🧭 Routing - Navigation between list and task details
- 🎯 Statistics - Learning progress display
- 🛡️ Security - API keys in environment variables
- React 18 - Main framework
- Vite - Fast bundler and dev server
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client for API requests
- React Router - Routing between pages
- React Markdown - Markdown content rendering
- Clone the repository:
git clone <repository-url>
cd ai-studynotes-frontend- Install dependencies:
npm install- Configure environment variables:
cp env.example .envEdit the .env file:
VITE_API_BASE_URL=http://localhost:3000/api
VITE_API_KEY=your-api-key-here- Start the dev server:
npm run devThe application will be available at http://localhost:5173
src/
├── components/ # React components
│ ├── StudyItemCard.jsx # Study material card
│ ├── StudyItemsList.jsx # Materials list with pagination
│ ├── TaskDetailView.jsx # Task detail view
│ ├── CreateTaskModal.jsx # Creation modal window
│ ├── DeleteConfirmModal.jsx # Deletion confirmation modal
│ └── LoadingSpinner.jsx # Loading indicator
├── pages/ # Application pages
│ ├── TaskListPage.jsx # Task list page
│ └── TaskDetailPage.jsx # Task detail page
├── hooks/ # Custom React hooks
│ ├── useStudyItems.js # Hook for working with list API
│ └── useTaskDetail.js # Hook for working with task details
├── services/ # API services
│ └── api.js # HTTP client and API methods
├── App.jsx # Main component with routing
├── main.jsx # Entry point
└── index.css # Global styles
The application works with an API that returns data in the following format:
{
"items": [
{
"id": "uuid",
"topic": "Topic Name",
"status": "DONE|PROCESSING|QUEUED",
"createdAt": "ISO date",
"updatedAt": "ISO date"
}
],
"cursor": "base64-encoded-cursor"
}To create a new task, a POST request is sent:
{
"topic": "Node.js Express"
}The API returns complete task information including Markdown content:
{
"id": "uuid",
"topic": "Laravel",
"status": "DONE",
"createdAt": "ISO date",
"updatedAt": "ISO date",
"researchMd": "# Study Notes on Laravel\n\n## 1. Introduction to Laravel\n..."
}GET /tasks?cursor=&limit=- Get list of materialsGET /tasks/:id- Get specific materialPOST /tasks- Create new taskDELETE /tasks/:id- Delete task
All requests must include the header:
x-api-key: your-api-key
npm run dev- Start dev servernpm run build- Build for productionnpm run preview- Preview buildnpm run lint- ESLint code check
Custom colors and styles are configured in tailwind.config.js:
- Primary colors for branding
- Custom components in
index.css
VITE_API_BASE_URL- Base API URLVITE_API_KEY- API key for authentication
- Create a file in
src/components/ - Export the component as default
- Import and use in
App.jsx
- Add new methods in
src/services/api.js - Create a hook in
src/hooks/for state management - Use the hook in components
MIT License