Official documentation website for the Safwa Network decentralized referral protocol
A modern, bilingual (English/Arabic) documentation site built with vanilla JavaScript, featuring a clean UI, dark mode support, and comprehensive guides for the Safwa Network ecosystem.
- π Bilingual Support: Full English and Arabic documentation with RTL layout support
- π Dark Mode: Beautiful dark theme with smooth transitions
- π± Responsive Design: Optimized for desktop, tablet, and mobile devices
- π Smart Navigation: Hierarchical collapsible sidebar with auto-expansion
- π Table of Contents: Auto-generated on-page navigation for long documents
- π Hash-based Routing: Client-side routing for seamless navigation
- β¨ Modern UI: Clean, professional design with Tailwind CSS
- β‘ Fast & Lightweight: No build process, runs directly in the browser
- π Markdown Rendering: Full markdown support with KaTeX for mathematical equations
- π¨ Syntax Highlighting: Code blocks with proper formatting
- π Dynamic Content: JSON-based structure for easy content management
- βΏ Accessible: Semantic HTML with proper ARIA labels
docs.safwa.network/
βββ index.html # Main HTML file
βββ structure.json # Documentation structure definition
βββ js/
β βββ app.js # Main application logic
βββ markdown/ # Markdown content files
β βββ en/ # English documentation
β β βββ guides/ # User guides
β β βββ help/ # Help & tutorials
β β β βββ tutorials/
β β β βββ wallets/
β β β βββ education/
β β βββ legal/ # Legal documents
β β βββ technical/ # Technical documentation
β βββ ar/ # Arabic documentation (same structure)
βββ img/ # Images and assets
βββ ui-ux/ # UI/UX design references
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Python 3 (for local development server) or any static file server
-
Clone the repository
git clone https://github.com/safwanetwork/docs.safwa.network.git cd docs.safwa.network -
Start a local server
python3 -m http.server 8080
-
Open in browser
http://localhost:8080
Node.js (http-server)
npx http-server -p 8080PHP
php -S localhost:8080Add your markdown files to the appropriate directory:
- English:
markdown/en/[category]/ - Arabic:
markdown/ar/[category]/
Example: markdown/en/guides/My_New_Guide.md
# My New Guide
This is the content of my guide.
## Section 1
Content here...Add your new file to structure.json:
{
"en": {
"guides": {
"_files": [
"About.md",
"My_New_Guide.md" // Add here
]
}
}
}The new content will appear in the navigation automatically.
Edit index.html to customize colors:
tailwind.config = {
theme: {
extend: {
colors: {
"primary": "#135bec", // Primary brand color
"background-light": "#f6f6f8", // Light mode background
"background-dark": "#101622", // Dark mode background
}
}
}
}Update category icons in js/app.js:
const categoryIcons = {
'guides': 'book',
'help': 'help',
'legal': 'gavel',
'technical': 'code',
};- Push to GitHub
- Go to Settings β Pages
- Select branch and
/(root) folder - Save
- Connect your repository
- Build command: (leave empty)
- Publish directory:
/ - Deploy
vercel --prod- Create directory:
markdown/[lang-code]/ - Add to
structure.json:{ "en": { ... }, "ar": { ... }, "fr": { ... } // New language } - Update language toggle in
js/app.js
Modify the marked configuration in js/app.js:
marked.setOptions({
breaks: true,
gfm: true,
// Add custom options
});- About Safwa Network
- Onboarding Guide
- FAQ
- Tutorials: How to join, earn, and participate
- Wallets: Binance, MetaMask, and other wallet guides
- Education: Blockchain basics and concepts
- Terms of Service
- Privacy Policy
- AML/CTF Policy
- Risk Disclosure
- Law Enforcement Policy
- And more...
- Smart Contract Documentation
- API References
- Integration Guides
- HTML5: Semantic markup
- Tailwind CSS: Utility-first CSS framework
- JavaScript (ES6+): Modern vanilla JavaScript
- Marked.js: Markdown parser
- KaTeX: Mathematical equation rendering
- Material Symbols: Icon library
- Google Fonts: Inter (English) & IBM Plex Sans Arabic (Arabic)
We welcome contributions! Here's how you can help:
- Report Issues: Found a bug or typo? Open an issue
- Improve Documentation: Submit PRs with corrections or new content
- Translate: Help translate documentation to new languages
- Suggest Features: Share ideas for improvements
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: safwa.network
- Documentation: docs.safwa.network
- Smart Contract: PolygonScan
- GitHub: github.com/safwanetwork
Need help? Reach out:
- Email: support@safwa.network
- Twitter: @SafwaNetwork
- Telegram: t.me/SafwaNetwork
- Built with β€οΈ by the Safwa Network team
- Icons by Material Symbols
- Fonts by Google Fonts
Β© 2026 Safwa Network. All rights reserved.