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)
- 📝 Rich Markdown Editor: Full-featured markdown editing with syntax highlighting
- 🔒 Secret Protection: Password-protect notes with bcrypt encryption
- 👥 Multi-User Support: User authentication and management system
- 📊 Centralized Dashboard: Manage all your notes from one place
- 🔗 Unique URLs: Each note gets a shareable, unique identifier
- 📱 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
- 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
- Node.js 18+
- MongoDB (local installation or MongoDB Atlas)
- Git
-
Clone the repository:
git clone https://github.com/berkanktk/SecretMarkdocs.git cd SecretMarkdocs -
Install dependencies:
npm install --legacy-peer-deps
-
Set up environment variables: Create a
.envfile in the root directory (also required for production):# Database MONGODB_URI=<INSERT_MONGODB_URI_HERE>
-
Start MongoDB:
# If using local MongoDB mongod # Or use MongoDB Atlas connection string in DATABASE_URL
-
Run the development server:
npm run dev
-
Create your first admin user:
- Navigate to
http://localhost:5173/auth/register - Register your account (first user becomes admin automatically)
- Navigate to
- Navigate to
/editoror use the dashboard - Write your content in markdown
- Toggle secret protection if needed
- Save and share the unique URL
- Admin users can create invite codes
- Users register with invite codes or open registration
- Manage users from the admin dashboard
- Bcrypt for storing user passwords
- Session-based authentication with JSON Web Tokens (JWT)
The application automatically creates these collections:
users: User accounts and authenticationnotes: Note content and metadatainvites: Invitation codes for user registration
- Modify styles in
src/app.css - Update branding in
src/routes/+layout.svelte - Configure authentication in
src/lib/auth.ts
- Use strong
AUTH_SECRETin 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
- 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
This project is open source and available under the MIT License.
- Create an issue on GitHub for bug reports
- Check existing issues for common problems
- Star the project if you find it useful!




