Skip to content

Amitminer/DocsX

Repository files navigation

📚 DocsX

License: MIT

Stop repeating yourself! DocsX is a blazing-fast documentation and tutorial platform to help you create, share, and discover tutorials and docs—powered by AI and a modern tech stack.


Why

I made DocsX to solve the repeated problems I faced with technical documentation—scattered docs, clunky tools, and slow workflows. DocsX is built to make creating, sharing, and discovering docs fast, modern, and easier for everyone, with a little help from AI.

What is DocsX?

DocsX is an open-source, AI-powered platform for creating, sharing, and exploring technical documentation and tutorials. It combines a Rust backend and a Next.js frontend to deliver a seamless, modern experience for both writers and readers.


✨ Features

  • 📝 Markdown Docs & Tutorials: Write and edit in rich Markdown.
  • Instant Search: Find docs and answers in milliseconds.
  • 🤖 AI Summaries & Enhancement: Google AI for smarter docs.
  • 🔒 Secure Auth: Clerk + JWT for robust authentication.
  • 💬 Community Engagement: Like, bookmark, and interact.
  • 🌗 Modern UI: Next.js 15 + Tailwind CSS, dark mode by default.
  • 🏷️ Custom URLs: Share docs with memorable slugs.
  • 🗂️ Asset Support: Attach files and media to docs.

🚀 Quick Start

On Linux (one-liner):

chmod +x start.sh
./start.sh

This will:

  • Install Docker & Docker Compose if missing
  • Set up your .env file
  • Start DocsX with Docker Compose

Only for Linux users. For other OS, follow the manual Docker or local setup below.


🛠️ Local Development Setup

Prerequisites

Backend (Rust + Actix)

cd docsx-backend
cp env.example .env
# Edit .env with your config
cargo run --release

Runs at: http://localhost:8080

Frontend (Next.js + Tailwind)

cd docsx-frontend
pnpm install
cp env.example .env.local
# Edit .env.local with your config
pnpm run dev

Runs at: http://localhost:3000


🐳 Docker Support

You only need to edit the root .env file for all environment variables. Docker Compose will automatically use this file for both frontend and backend services.

Prerequisites

▶️ Run Everything with Docker

git clone https://github.com/Amitminer/DocsX
docx DocsX
cp .env.example .env
# Edit .env with your keys (Clerk, Google AI, database, etc.)
docker-compose up --build

⚙️ Environment Configuration

  • Edit the root .env file with your Clerk, Google AI, and database keys.
  • No need to edit service-specific env files for Docker usage.
  • See .env.example for required variables.

📡 API Reference

See API Usage for full details and examples.


🧱 Tech Stack

Layer Tech
Backend Rust, Actix Web, PostgreSQL, JWT, Clerk
Frontend Next.js 15, React, TypeScript, Tailwind
AI Google AI (Gemini)
Auth Clerk
Infra Docker, Railway, Vercel

📂 Project Structure

DocsX/
  docsx-frontend/    # Next.js frontend
  docsx-backend/     # Rust backend
  README.md          # (this file)
  DEPLOYMENT.md      # Deployment guide

📄 More Info


🧪 API Testing with Hurl

You can test the backend API using Hurl. Hurl test files are in the tests/ directory and cover all major endpoints.

Setting Variables

  • All variables (jwt, id) are set in tests/hurl.secrets using the format:
    jwt=your_jwt_token_here
    id=your_doc_id_here
  • Example values are provided in tests/hurl/hurl.secrets. Replace them with your real tokens and IDs before running tests.

Running Tests

Run each test file with your variables loaded:

hurl --variables-file tests/hurl/hurl.secrets tests/hurl/health.hurl
hurl --variables-file tests/hurl/hurl.secrets tests/hurl/docs.hurl

All test files use variables as {{jwt}}, {{id}}.

See Hurl documentation for more advanced usage.


📄 License

This project is licensed under the MIT License.

© 2025 AmitxD

Releases

No releases published

Packages

 
 
 

Contributors

Languages