Skip to content

Playing around using python-eve to create a simple LMS system.

Notifications You must be signed in to change notification settings

sachin-duhan/evify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Namiz API Project

🚀 Overview

Namiz is an educational platform API built with Eve (REST API framework for MongoDB) and includes functionalities like user management, courses, modules, lectures, quizzes, and certificates. It supports file uploads via AWS S3 and uses MongoDB as the core database.


🛠️ Features

  • User Management: Manage students and instructors.
  • Courses & Modules: Create courses with multiple modules and lectures.
  • Lectures & Quizzes: Attach lectures and quizzes to each module.
  • Certificates: Issue certificates upon course completion.
  • File Uploads: Upload lecture materials to AWS S3.
  • Dockerized Environment: Easily deploy the API with Docker.

🔧 Setup Instructions

1. Clone the Repo

git clone https://github.com/your-repo/namiz.git
cd namiz

2. Install Dependencies (with Virtual Environment)

make install

This command will:

  • Create a Python virtual environment.
  • Install the required dependencies from requirements.txt.

3. Run the API

make run

The API will be live at: http://localhost:5000.


🐳 Docker & Docker Compose Setup

1. Build the Docker Image

make build

This builds the Docker image using the Dockerfile.

2. Run the Docker Container

make docker-run

This will start the container and run the application on port 5000.

3. Stop the Docker Container

make docker-stop

4. Remove the Docker Container

make docker-remove

📦 Docker Compose

We have also included a docker-compose.yml file for managing both the API and MongoDB services.

To start the services with Docker Compose:

docker compose -f docker-compose.dev.yaml up

This command will:

  • Start MongoDB with persistent volume support.
  • Run the Namiz API container.

To stop the services:

docker compose -f docker-compose.dev.yaml down

📄 Makefile Commands

  • env: Creates a Python virtual environment.
  • install: Installs dependencies in the virtual environment.
  • run: Activates the virtual environment and runs the app.
  • build: Builds the Docker image.
  • docker-run: Runs the Docker container for the app.
  • docker-stop: Stops the Docker container.
  • docker-remove: Removes the Docker container.
  • clean: Cleans up the virtual environment and temporary files.
  • seed: Seeds the MongoDB database with sample data.
  • test: Runs tests using pytest.

🧪 Running Tests

make test

This will run all tests with coverage and display verbose output.

About

Playing around using python-eve to create a simple LMS system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published