This project is a React application that serves as the frontend for a Rails API. It interacts with various endpoints to manage assignments, courses, lessons, enrollments, and user profiles.
rails-api-frontend
├── public
│ └── index.html # Main HTML file for the React application
├── src
│ ├── index.tsx # Entry point for the React application
│ ├── App.tsx # Main App component with routing
│ ├── api
│ │ ├── client.ts # Configured Axios instance for API requests
│ │ └── endpoints.ts # API endpoint constants
│ ├── services
│ │ ├── assignmentsService.ts # Functions for assignments API
│ │ ├── coursesService.ts # Functions for courses API
│ │ ├── lessonsService.ts # Functions for lessons API
│ │ ├── enrollmentsService.ts # Functions for enrollments API
│ │ └── usersService.ts # Functions for users API
│ ├── components
│ │ ├── AssignmentList.tsx # Component for displaying assignments
│ │ ├── CourseList.tsx # Component for displaying courses
│ │ └── Pagination.tsx # Component for pagination
│ ├── pages
│ │ ├── Dashboard.tsx # Main landing page component
│ │ ├── CoursePage.tsx # Component for course details
│ │ ├── LessonPage.tsx # Component for lesson details
│ │ └── UserProfile.tsx # Component for user profile
│ ├── hooks
│ │ └── useFetch.ts # Custom hook for fetching data
│ ├── routes
│ │ └── index.tsx # Routing setup
│ ├── types
│ │ └── index.ts # TypeScript types and interfaces
│ ├── styles
│ │ └── globals.css # Global CSS styles
│ └── utils
│ └── format.ts # Utility functions for formatting
├── package.json # npm configuration file
├── tsconfig.json # TypeScript configuration file
├── .gitignore # Git ignore file
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd rails-api-frontend -
Install dependencies:
npm install -
Run the application:
npm start -
Open your browser: Navigate to
http://localhost:3000to view the application.
- Dashboard: A landing page that provides an overview of the application.
- Course Management: View and manage courses.
- Lesson Management: View and manage lessons associated with courses.
- Assignment Management: View and manage assignments for courses.
- User Profiles: View and manage user information.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.