Coursify is a full-stack web application serving as a Learning Management System (LMS), similar to platforms like Google Classroom. This application allows instructors to create and manage courses along with their materials, while students can enroll and access learning content.
- Authentication & Authorization: JWT-based login system with distinct user roles (Admin, Instructor, Student).
- User Management (Admin):
- View user statistics (total, active, pending).
- Manage users (approve/reject pending status, view list, delete).
- Course Management (Instructor):
- Create new courses by selecting from provided cover images.
- Update course details.
- Delete courses.
- View the list of students enrolled in their courses.
- Material Management (Instructor):
- Add learning materials (text, video links, PDF uploads).
- Upload PDF files for materials.
- Edit and delete materials.
- Student Functionality:
- Enroll in available courses.
- View the list of enrolled courses.
- Access details and materials of enrolled courses.
- Profile Management: Users can upload and update their profile avatars (JPG/PNG converted to WebP).
- Containerization: The entire application (backend, frontend, database) runs within Docker containers for a consistent development environment.
- Backend:
- Go (Golang)
- Chi (Router)
- PostgreSQL (Database)
golang-migrate/migrate(Database Migrations)- JWT (Authentication)
swaggo/swag(API Documentation)kolesa-team/go-webp(Image Conversion)
- Frontend:
- Vue.js 3 (Composition API)
- TypeScript
- Vite (Build Tool)
- Tailwind CSS (Styling)
- shadcn-vue (UI Components)
- TanStack Table (Data Tables)
- Pinia (State Management - implied)
- Axios (HTTP Client)
- DevOps:
- Docker
- Docker Compose
Please note that Coursify is currently under active development. As such, you may encounter bugs or incomplete features.
- Storage: File uploads (avatars, course materials) are currently stored on the local filesystem within the
backend/uploadsdirectory. Cloud storage integration (like AWS S3 or Google Cloud Storage) is planned for future development. - Testing: While core functionalities are tested, comprehensive test coverage is still in progress.
Ensure you have Docker Desktop installed.
-
Clone the Repository:
git clone https://github.com/dimasrizkyfebrian/coursify.git cd coursify -
Configure Environment Variables:
- Copy the
backend/.env.examplefile (if present) tobackend/.env. - Fill in the required environment variables in
backend/.env, especially:DB_HOST=db(Keep this for Docker)DB_PORT=5432(Keep this for Docker)DB_USERDB_PASSWORDDB_NAMEDB_SSLMODE=disableJWT_SECRET_KEY(Generate a strong secret key)
- Copy the
frontend/.env.examplefile (if present) tofrontend/.env. - Fill in the required environment variables in
frontend/.env:VITE_API_BASE_URL=http://localhost:8080/api(Use the exposed backend port)
- Copy the
-
Run Docker Compose:
- Open a terminal in the project root directory (
coursify/). - Run the following command to build the images and start all containers (database, backend, frontend):
docker-compose up -d --build
- Open a terminal in the project root directory (
-
Run Database Migrations:
-
Open a new terminal or use the same one.
-
Navigate to the
backend/directory: -
cd backend
-
Run the migrations using
golang-migrate/migrate. ReplaceYOUR_PASSWORDandYOUR_DB_NAMEaccording to your.env: -
# Using PowerShell migrate -database "postgres://postgres:YOUR_PASSWORD@localhost:5433/YOUR_DB_NAME?sslmode=disable" -path ./migrations up # Or using Bash/Cmd # export DB_URL="postgres://postgres:YOUR_PASSWORD@localhost:5433/YOUR_DB_NAME?sslmode=disable" # migrate -database ${DB_URL} -path ./migrations up
-
(Note: The migration command might differ based on your
golang-migrate/migratesetup)
-
-
Run Seeder (Optional but Recommended):
- Still inside the
backend/directory, run the seeder script:
go run ./cmd/seeder/main.go
- This will create default users (admin, instructor, student) and some random data.
- Still inside the
-
Access the Application:
- Frontend: Open your browser and navigate to
http://localhost:5173(as perdocker-compose.ymlport mapping). - Backend API: Available at
http://localhost:8080. - API Documentation (Swagger): Access
http://localhost:8080/swagger/index.html. - Database: Can be accessed using tools like TablePlus/DBeaver at
localhost:5433.
- Frontend: Open your browser and navigate to