Skip to content

A simple yet powerful Markdown-based note app, designed to make sharing your notes fast and secure.

License

Notifications You must be signed in to change notification settings

Berkanktk/SecretMarkdocs

Repository files navigation

SecretMarkdocs

Self-Hosted Notes Platform - A modern, secure, and feature-rich markdown notes platform you can host on your own infrastructure.

Built with SvelteKit and MongoDB, SecretMarkdocs gives you complete control over your notes and data privacy.

🔗 Live Demo: Demo (Secret: supersecret)

Features

  • 📝 Rich Markdown Editor: Full-featured markdown editing with syntax highlighting

Markdown Editor

  • 🔒 Secret Protection: Password-protect notes with bcrypt encryption

Secret Protection

  • 👥 Multi-User Support: User authentication and management system

Multi-User Support

  • 📊 Centralized Dashboard: Manage all your notes from one place

Dashboard

  • 🔗 Unique URLs: Each note gets a shareable, unique identifier

Unique URLs

  • 📱 Responsive Design: Optimized for desktop, tablet, and mobile
  • 🏠 Self-Hosted: Full control over your data and infrastructure
  • 🔐 Privacy First: No third-party tracking or data collection

🛠️ Tech Stack

  • Frontend: SvelteKit, TypeScript, Tailwind CSS
  • Backend: Node.js, SvelteKit API routes
  • Database: MongoDB
  • Authentication: Custom auth with bcrypt
  • Deployment: Compatible with any Node.js hosting platform

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB (local installation or MongoDB Atlas)
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/berkanktk/SecretMarkdocs.git
    cd SecretMarkdocs
  2. Install dependencies:

    npm install --legacy-peer-deps
  3. Set up environment variables: Create a .env file in the root directory (also required for production):

    # Database
    MONGODB_URI=<INSERT_MONGODB_URI_HERE>
  4. Start MongoDB:

    # If using local MongoDB
    mongod
    
    # Or use MongoDB Atlas connection string in DATABASE_URL
  5. Run the development server:

    npm run dev
  6. Create your first admin user:

    • Navigate to http://localhost:5173/auth/register
    • Register your account (first user becomes admin automatically)

📖 Usage

Creating Notes

  1. Navigate to /editor or use the dashboard
  2. Write your content in markdown
  3. Toggle secret protection if needed
  4. Save and share the unique URL

Managing Users

  • Admin users can create invite codes
  • Users register with invite codes or open registration
  • Manage users from the admin dashboard

Security Features

  • Bcrypt for storing user passwords
  • Session-based authentication with JSON Web Tokens (JWT)

🔧 Configuration

Database Schema

The application automatically creates these collections:

  • users: User accounts and authentication
  • notes: Note content and metadata
  • invites: Invitation codes for user registration

Customization

  • Modify styles in src/app.css
  • Update branding in src/routes/+layout.svelte
  • Configure authentication in src/lib/auth.ts

🛡️ Security Considerations

  • Use strong AUTH_SECRET in production (minimum 32 characters)
  • Enable HTTPS in production
  • Regularly update dependencies
  • Use MongoDB authentication and network restrictions
  • Consider implementing rate limiting
  • Regular backups of your MongoDB database

🔮 Future Features

  • Add and render markdown notes with syntax highlighting
  • Add a way to delete notes
  • Add a way to edit notes
  • Centralized user management with invite codes
  • Sharable links
  • Secret protection for notes
  • Add a way to search & filter/sort notes (WIP)
  • Encrypt notes

📄 License

This project is open source and available under the MIT License.

📞 Support

  • Create an issue on GitHub for bug reports
  • Check existing issues for common problems
  • Star the project if you find it useful!

About

A simple yet powerful Markdown-based note app, designed to make sharing your notes fast and secure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published