https://github.com/geekelo/cla_portal_api
The CLA Learning Portal API is a backend service built with Ruby on Rails to support the CLA Learning Portal. This API facilitates user authentication, course management, assignments, and progress tracking for students, facilitators, and administrators.
https://github.com/geekelo/cla_portal_api
jwt-authentication ruby ruby-on-rails
Last synced: about 2 months ago
JSON representation
The CLA Learning Portal API is a backend service built with Ruby on Rails to support the CLA Learning Portal. This API facilitates user authentication, course management, assignments, and progress tracking for students, facilitators, and administrators.
- Host: GitHub
- URL: https://github.com/geekelo/cla_portal_api
- Owner: geekelo
- Created: 2025-02-02T19:27:33.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2025-12-16T20:42:12.000Z (7 months ago)
- Last Synced: 2025-12-20T10:57:56.932Z (7 months ago)
- Topics: jwt-authentication, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLA Learning Portal API
## Overview
The CLA Learning Portal API is a backend service built with Ruby on Rails to support the CLA Learning Portal. This API facilitates user authentication, course management, assignments, and progress tracking for students, facilitators, and administrators.
## Features
- User authentication (JWT-based authentication)
- Role-based access control (Students, Facilitators, Admins)
- Course and cohort management
- Assignment creation and submission tracking
- Live class scheduling and notifications
- Reporting and progress tracking
## Installation
### Prerequisites
Ensure you have the following installed:
- Ruby (>= 3.0)
- Rails (>= 7.0)
- PostgreSQL
- Redis (for background jobs, if required)
- Bundler
### Setup
1. Clone the repository:
```sh
git clone https://github.com/your-repo/cla-learning-api.git
cd cla-learning-api
```
2. Install dependencies:
```sh
bundle install
```
3. Configure database:
```sh
rails db:create db:migrate db:seed
```
4. Start the server:
```sh
rails server
```
## API Endpoints
### Authentication
- `POST /api/v1/signup` - Register a new user
- `POST /api/v1/login` - Authenticate user and return a token
- `POST /api/v1/logout` - Log out the current user
### Course Management
- `GET /api/v1/courses` - Fetch all courses
- `POST /api/v1/courses` - Create a new course (Admin/Facilitator only)
- `PUT /api/v1/courses/:id` - Update course details
- `DELETE /api/v1/courses/:id` - Remove a course (Admin only)
### Assignments
- `GET /api/v1/assignments` - List all assignments
- `POST /api/v1/assignments` - Create an assignment (Facilitator only)
- `POST /api/v1/assignments/:id/submit` - Submit an assignment (Student only)
## Environment Variables
Create a `.env` file and configure the following:
```
DATABASE_URL=postgres://user:password@localhost:5432/cla_learning_db
SECRET_KEY_BASE=your_secret_key
REDIS_URL=redis://localhost:6379/0
```
## Deployment
### Docker
1. Build and run the container:
```sh
docker-compose up --build
```
### Heroku
1. Deploy the app:
```sh
git push heroku main
heroku run rails db:migrate
```
## Testing
Run the test suite using:
```sh
rspec
```
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature-name`)
3. Commit changes (`git commit -m 'Add new feature'`)
4. Push to the branch (`git push origin feature-name`)
5. Create a Pull Request
## License
This project is licensed under the MIT License.