Skip to content

ibrahimalicode/rails-api-frontend

Repository files navigation

Rails API Frontend

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.

Project Structure

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

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd rails-api-frontend
    
  2. Install dependencies:

    npm install
    
  3. Run the application:

    npm start
    
  4. Open your browser: Navigate to http://localhost:3000 to view the application.

Features

  • 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.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages