15d9459ea13a7621c4b926c205c49cc1f925f436
P2NS Website
Modern, professional public-facing website for P2NS (Peer-to-Peer Decentralized DNS System).
Features
- Modern Design: Built with Next.js 16, TypeScript, and Tailwind CSS 4
- Responsive: Mobile-first design that works on all devices
- Dark Mode: Automatic dark mode support
- Interactive Diagrams: Animated visualizations of P2P concepts
- Comprehensive Documentation: Complete guides and API references
- SEO Optimized: Proper metadata, structured data, and semantic HTML
- Accessible: WCAG AA compliant with proper ARIA labels
Getting Started
Prerequisites
- Node.js 20 or higher
- npm
Installation
# Install dependencies (run as your user, not root — Docker-created node_modules may need removal first)
npm install
# Run development server
npm run dev
# Build and run production server (port 8588)
npm run prod
# Or build once, then start
npm run build
npm start
The production server listens on http://localhost:8588. Development (npm run dev) uses port 3000 by default.
Project Structure
p2ns-website/
├── app/ # Next.js App Router pages
│ ├── about/ # About P2NS page
│ ├── learn/ # P2P education pages
│ ├── features/ # Features page
│ ├── docs/ # Documentation pages
│ └── community/ # Community page
├── components/ # React components
│ ├── layout/ # Layout components (Navigation, Footer)
│ ├── sections/ # Page sections (Hero, Features, etc.)
│ ├── diagrams/ # Interactive diagrams
│ └── ui/ # Reusable UI components
├── public/ # Static assets
└── styles/ # Global styles
Deployment
Self-Hosted
The website is designed to be self-hostable. You can deploy it using:
- Docker: See
Dockerfileanddocker-compose.yml - Node.js: Run
npm run build && npm start - Static Export: Configure Next.js for static export if needed
Environment Variables
No environment variables are required for basic operation. All configuration is handled through Next.js.
Technologies Used
- Next.js 16: React framework with App Router
- TypeScript 5: Type-safe development
- Tailwind CSS 4: Utility-first CSS framework
- Framer Motion 12: Animation library
- Lucide React: Icon library
Dependencies and security
Keep dependencies current:
npm audit # should report 0 vulnerabilities after overrides in package.json
npm outdated # review available upgrades
npm install # apply package-lock.json
If npm install fails with permission errors, node_modules may have been created by Docker as root. Remove it and reinstall as your user:
rm -rf node_modules package-lock.json # or: sudo rm -rf node_modules
npm install
Contributing
Contributions are welcome! Please follow the same contribution guidelines as the main P2NS repository.
Languages
TypeScript
96.9%
CSS
2.7%
Dockerfile
0.2%
JavaScript
0.2%