A modern, open-source wiki encyclopedia system built with Node.js, Express.js, and Markdown. δΈζζζ‘£
- Markdown Editor - Write articles with a rich Markdown editor supporting live preview
- User Authentication - Secure user registration and login system with bcrypt password hashing
- Theme System - 8 beautiful themes including dark, light, cyberpunk, forest, and more
- Tag System - Organize articles with colorful tags
- Search Functionality - Full-text search across all articles
- Responsive Design - Mobile-friendly UI with modern aesthetics
- Image Support - Upload and display images in articles
- External Database - Flexible database integration via REST API
- Backend: Node.js, Express.js
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Authentication: Express Session, bcryptjs
- Database: External REST API integration
- Markdown: Custom MDParser library
NeoWiki/
βββ src/
β βββ server.js # Main Express server
β βββ config.js # Configuration management
β βββ database.js # Database API integration
β βββ middleware/
β β βββ auth.js # Authentication middleware
β βββ routes/
β βββ api.js # General API routes
β βββ articles.js # Article CRUD operations
β βββ users.js # User management
βββ public/
β βββ index.html # Landing page
β βββ home.html # Homepage with article list
β βββ article.html # Article viewer
β βββ editor.html # Markdown editor
β βββ search.html # Search page
β βββ login.html # Login page
β βββ register.html # Registration page
β βββ admin.html # Admin dashboard
β βββ settings.html # User settings
β βββ user.html # User profile
β βββ css/
β β βββ style.css # Global styles
β βββ js/
β β βββ api.js # API client
β β βββ components.js # Reusable UI components
β β βββ theme.js # Theme management
β β βββ wiki-settings.js # Wiki configuration
β βββ lib/
β βββ MDParser.js # Markdown parser
β βββ editor-app.js # Editor functionality
β βββ editor-styles.css # Editor styles
βββ uploads/ # User uploaded files
βββ package.json
βββ .env.example
- Node.js >= 14.0.0
- npm or yarn
- Clone the repository:
git clone https://github.com/SoraStr/NeoWiki.git
cd NeoWiki- Install dependencies:
npm install- Configure environment variables:
cp .env.example .env
# Edit .env with your database API endpoint- Start the server:
npm start- Open your browser and visit
http://localhost:3000
On first run, you'll be prompted to:
- Set your wiki name and description
- Create an admin account
Create a .env file in the project root:
PORT=3000
DATABASE_API_URL=https://your-database-api.com
SESSION_SECRET=your-secret-key-hereCustomize your wiki through the admin panel:
- Wiki name and description
- Logo (emoji or image URL)
- Feature cards
- Available themes
- Vocaloid Dark (default) - Purple and pink gradient theme
- Light - Clean white theme
- Sepia - Warm paper-like theme
- Cyberpunk - Neon-infused dark theme
- Forest - Natural green theme
- Ocean - Deep blue theme
- Sunset - Warm orange gradient
- Hacker - Terminal-style theme
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/articles |
List all articles |
| GET | /api/articles/:id |
Get article by ID |
| POST | /api/articles |
Create new article |
| PUT | /api/articles/:id |
Update article |
| DELETE | /api/articles/:id |
Delete article |
| GET | /api/articles/search?q= |
Search articles |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register |
Register new user |
| POST | /api/login |
User login |
| POST | /api/logout |
User logout |
| GET | /api/user |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/users |
List all users |
| PUT | /api/admin/users/:id/role |
Update user role |
| DELETE | /api/admin/users/:id |
Delete user |
| GET | /api/admin/settings |
Get site settings |
| PUT | /api/admin/settings |
Update site settings |
npm run devThe project uses vanilla JavaScript with consistent naming conventions:
- CamelCase for functions and variables
- PascalCase for component constructors
Edit public/css/style.css and add a new [data-theme="theme-name"] selector with your color variables.
The custom MDParser in public/lib/MDParser.js can be extended to support additional Markdown syntax.
Modify src/database.js to connect to your preferred database while maintaining the same API interface.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Express.js team for the web framework
- The open-source community for various utilities