A full-stack documentation and knowledge management system built with the MERN stack (PostgreSQL variant).
- 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.
- Frontend: React, Vite, TailwindCSS, React Router, React Quill.
- Backend: Node.js, Express, PostgreSQL.
- Database: PostgreSQL with
pgpool.
- Node.js (v18+)
- PostgreSQL installed and running.
Create a PostgreSQL database named knowledge_base and run the schema script (if provided in database.sql):
CREATE DATABASE knowledge_base;- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Configure environment variables in
.env:PORT=5000 DATABASE_URL=postgresql://user:password@localhost:5432/knowledge_base JWT_SECRET=your_secure_secret NODE_ENV=development
- Start the server:
npm run dev
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
The application will be available at http://localhost:5173.
Dev_innovation_submission.mp4
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.
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).
GET /api/search?q=query- Search articles by title or content.
The frontend is configured for deployment on static hosting. The backend requires a Node.js environment (like Render, Railway, or Heroku).