Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

A full-stack documentation and knowledge management system built with the MERN stack (PostgreSQL variant). ⚠️ Demo Note: Due to deployment limitations, please watch the demo video for a full walkthrough of features including authentication, role-based access, article creation, and database interactions.

Features

  • Authentication: Secure JWT-based auth with role-based access control (Reader, Editor, Admin).
  • Articles: Create, read, update, and delete articles with a rich text editor.
  • Search: Full-text search functionality for articles.
  • Categorization: Organize content with categories and tags.
  • History: Track article version history.
  • Admin Panel: Manage users and content from a centralized dashboard.

Tech Stack

  • Frontend: React, Vite, TailwindCSS, React Router, React Quill.
  • Backend: Node.js, Express, PostgreSQL.
  • Database: PostgreSQL with pg pool.

Getting Started

Prerequisites

  • Node.js (v18+)
  • PostgreSQL installed and running.

1. Database Setup

Create a PostgreSQL database named knowledge_base and run the schema script (if provided in database.sql):

CREATE DATABASE knowledge_base;

2. Backend Setup

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    npm install
  3. Configure environment variables in .env:
    PORT=5000
    DATABASE_URL=postgresql://user:password@localhost:5432/knowledge_base
    JWT_SECRET=your_secure_secret
    NODE_ENV=development
  4. Start the server:
    npm run dev

3. Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

The application will be available at http://localhost:5173.

DEMO

Dev_innovation_submission.mp4

API Documentation

Auth

  • POST /api/auth/register - Create a new account.
  • POST /api/auth/login - Authenticate user and get token.
  • GET /api/auth/me - Get current user profile.

Articles

  • GET /api/articles - List articles (supports pagination).
  • GET /api/articles/:id - Get article details.
  • POST /api/articles - Create article (Editor+).
  • PUT /api/articles/:id - Update article (Editor+).
  • DELETE /api/articles/:id - Delete article (Admin).

Search

  • GET /api/search?q=query - Search articles by title or content.

Deployment

The frontend is configured for deployment on static hosting. The backend requires a Node.js environment (like Render, Railway, or Heroku).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages