Skip to content

Backend for the Learning Dashboard. Node.js/Express.js API with TypeScript, Prisma ORM, and MySQL. Handles user authentication (JWT), AI/NLP-driven resource recommendations, and progress tracking. Includes RESTful endpoints for goals, resources, and user analytics.

License

Notifications You must be signed in to change notification settings

gayanukabulegoda/LearnFlow-BACKEND

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LearnFlow Logo

LearnFlow BACKEND

Welcome to the LearnFlow backend repository! This Node.js/Express.js API (with TypeScript, Prisma, and MySQL) powers a dynamic learning platform. It handles user authentication, AI-driven resource recommendations, and progress tracking for self-learners.
Explore the project »

· Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. API Documentation
  4. Frontend Repository
  5. License

About The Project

LearnFlow is a smart, adaptive platform that helps users set and track their personal learning goals, such as “Learn Python” or “Master React.” By leveraging basic AI/NLP techniques, it recommends relevant free online resources (articles, videos, courses) to support each user’s unique learning path. Users can log their progress, maintain streaks, and receive weekly learning recommendations to stay motivated.

Core Features

  1. Goal Setting and Management
    Users can create learning goals and break them down into smaller, manageable tasks.

  2. AI-Driven Resource Recommendations
    The system uses libraries like compromise and natural to analyze goals and suggest relevant resources from public APIs (Wikipedia, MDN).

  3. Progress Tracking
    Users can Track their progress, update streaks, and visualize learning progress.

  4. User Authentication & Authorization
    Secure login and API access control via JSON Web Tokens (JWT).

  5. RESTful Endpoints
    Organized routes for goals, resources, analytics, and user management.

(back to top)


Built With

This backend is powered by a modern, scalable stack ensuring robust performance and maintainability:

Node.js Express.js TypeScript Prisma MySQL JWT Postman

(back to top)


Getting Started

This section will guide you through setting up the LearnFlow BACKEND on your local machine.

Prerequisites

  1. Node.js (v22+ recommended)
    Download & Install Node.js
  2. MySQL (or a compatible SQL database)
    Download & Install MySQL
  3. npm or yarn (npm comes bundled with Node.js)
    Install Yarn if you prefer Yarn
  4. Postman (optional for API testing)
    Download Postman

Installation and Setup

  1. Clone the repository

    git clone https://github.com/gayanukabulegoda/LearnFlow-BACKEND.git

    Navigate into the project directory:

    cd LearnFlow-BACKEND
  2. Install dependencies

    npm install

    or

    yarn install
  3. Configure Environment Variables
    Create a .env file in the root directory and set the following variables (example):

    DATABASE_URL="mysql://<username>:<password>@localhost:3306/learnflow_db"
    JWT_SECRET="your_jwt_secret_key"
    JWT_EXPIRES_IN="in_days, hours, minutes or seconds (e.g., 7d)"
    PORT=5000
    NODE_ENV=development
    CLIENT_URL=http://localhost:3000
    CURRENT_API_VERSION=v1

    Adjust the values according to your local or production environment.

  4. Database Setup with Prisma
    Initialize or migrate your database schema:

    npx prisma migrate dev

    This command will create or update your database schema according to the Prisma schema definition in prisma/schema.prisma.

Usage

  1. Start the development server

    npm run dev

    or

    yarn dev

    The server should now be running at http://localhost:5000.

  2. Production build and run

    npm run build
    npm start

    or

    yarn build
    yarn start

    This will compile TypeScript to JavaScript and run the production build.

  3. Testing (optional)
    If you have unit or integration tests, you can run:

    npm run test

    or

    yarn test

(back to top)


API Documentation

Comprehensive API documentation (including endpoints, request/response examples, and environment setups) can be found in the Postman Collection.

  • Make sure the server is running locally (or remotely) before sending requests to the provided endpoints.
  • The Postman documentation also includes sample payloads and environment variables for quicker testing.

(back to top)


Frontend Repository

The frontend for this project is built with React. Visit the LearnFlow FRONTEND repository for more details:


License

Distributed under the MIT License. See LICENSE for more information.

(back to top)


About

Backend for the Learning Dashboard. Node.js/Express.js API with TypeScript, Prisma ORM, and MySQL. Handles user authentication (JWT), AI/NLP-driven resource recommendations, and progress tracking. Includes RESTful endpoints for goals, resources, and user analytics.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published