Table of Contents
NExTZ Documentation
Complete guide for users and developers. Learn how to use the platform or build your own.
🚀 Getting Started
For Users
- Register: Click "Get Started" and create your account
- Verify Email: Go to Settings > Account to verify your email
- Setup Profile: Add a profile picture and bio
- Start Posting: Share your first post!
For Developers
- Prerequisites: .NET 9 SDK, SQLite/PostgreSQL
- Clone:
git clone [repository-url] - Setup: Configure
appsettings.json - Run:
dotnet run
📱 User Guide
Creating Posts
Text Posts
- Navigate to Home or Posting page
- Type your message in the composer
- Use #hashtags and @mentions
- Click "Post" to share
Media Posts
- Click the image icon in the composer, or drag & drop files
- Select images or videos (up to 10 files for carousel)
- Use the GIF picker to add animated GIFs
- Add a caption (optional)
- Click "Post" to share
Managing Posts
- Edit: Click ⋯ > Edit on your post
- Delete: Click ⋯ > Delete on your post
- Like: Click the heart icon
- Comment: Click the comment icon
- Bookmark: Click the bookmark icon to save
- Copy Link: Click ⋯ > Copy link to share
- Report: Click ⋯ > Report to flag inappropriate content
Reporting Content
How to Report a Post
- Click the ⋯ menu on any post
- Select "Report"
- Choose a reason from the dropdown
- Add optional details
- Click "Submit Report"
Report Reasons
- Spam: Unwanted advertising or repetitive content
- Harassment: Targeted abuse or bullying
- Hate Speech: Content promoting discrimination
- Violence: Graphic or violent content
- Misinformation: False or misleading information
- Other: Any other policy violation
Using Chat
Starting a Conversation
- Go to Chat page
- Select a contact from the list
- Type your message and press Enter
Features
- Real-time: Messages appear instantly via WebSockets
- Media Sharing: Send images, videos, and GIFs
- Drag & Drop: Drop files directly into the chat
- Typing Indicators: See when someone is typing
- Online Status: Green dot shows who's online
- Message History: Scroll to view past messages
- Delete Messages: Right-click to delete for yourself or everyone (within 30 min)
- Forward Messages: Right-click to forward messages to other contacts
- Reply to Messages: Reply to specific messages in a thread
- Video/Audio Calls: WebRTC-powered video calls with screen sharing
End-to-End Encryption
What is E2E Encryption?
End-to-end encryption ensures only you and your chat partner can read messages. Even the server cannot decrypt them.
Setting Up Encryption
- Open a chat with any user
- Click "Enable Encryption" or accept the encryption request
- Wait for key exchange (green lock icon)
- Start chatting securely!
Encryption States
- Not Encrypted - Plain text messages
- Pending - Key exchange in progress
- Encrypted - Secure messaging active
- Key Mismatch - Keys don't match (re-establish)
Managing Encryption
- End Encryption: Click the badge to stop encrypted session
- Clear Messages: Encrypted messages are cleared when ending session
- Re-establish: You can enable encryption again anytime
Profiles
Editing Your Profile
- Click your profile picture > "Profile"
- Click "Edit Profile" button
- Update your information:
- Profile Picture
- Banner Image
- Display Name
- Bio (500 characters)
- Birthday
- Pronouns
- Location
- Click "Save Changes"
Following Users
- Visit any user's profile
- Click "Follow"
- Their posts will appear in your "Followed" feed
- Click "Unfollow" to stop following
Settings
Account Settings
- Username: Change your username
- Email: Update email address
- Email Verification: Verify your email for security
- Phone Number: Add phone for account recovery
Security
- Password: Change your password regularly
- 2FA: Enable two-factor authentication (TOTP)
- Active Sessions: View and manage devices
Privacy
- Profile Visibility: Public, Friends Only, or Private
- Message Permissions: Who can message you
- Online Status: Show/hide when you're online
- Search Visibility: Appear in search results
Appearance
- Theme: Light, Dark, System, or Christmas
- Font Size: Small, Medium, Large, or X-Large
- Font Family: System, Inter, Roboto, Open Sans, Lato
- Timezone: Set your timezone for accurate timestamps
Passkey Login (Passwordless)
What are Passkeys?
Passkeys are a modern, secure alternative to passwords. They use your device's built-in security (fingerprint, face ID, or hardware key) to authenticate you.
Benefits
- More Secure: Resistant to phishing attacks
- Faster Login: One-tap authentication
- No Password: No password to remember or reset
- Cross-Device: Works with password managers like Bitwarden
Setting Up Passkeys
- Go to Settings > Security > Passkeys
- Click "Register New Passkey"
- Follow your device's authentication prompt
- Give your passkey a name (e.g., "MacBook", "iPhone")
Login with Passkey
- On the login page, click "Login with Passkey"
- Enter your username or email
- Authenticate with your device
- You're in!
💻 Developer Guide
🏗️ Architecture Overview
Design Pattern
NExTZ follows the MVC (Model-View-Controller) pattern using ASP.NET Core.
Project Structure
NExTZ_code/
├── Controllers/ # MVC Controllers (routing & logic)
│ ├── LandingController.cs
│ ├── UserController.cs
│ ├── ContentController.cs
│ ├── ChatController.cs
│ └── AdminController.cs
├── Models/ # Data models
│ ├── User.cs
│ ├── Post.cs
│ ├── Message.cs
│ └── ...
├── Services/ # Business logic
│ ├── UserService.cs
│ ├── EmailService.cs
│ └── ...
├── Data/ # Database context
│ └── ApplicationDbContext.cs
├── Hubs/ # SignalR hubs
│ ├── ChatHub.cs
│ └── NotificationHub.cs
├── Views/ # Razor views
│ ├── Landing/
│ ├── User/
│ └── Shared/
└── wwwroot/ # Static files
├── css/
├── js/
└── images/
Key Components
- Authentication: Cookie-based with optional Passkey/WebAuthn
- Real-time: SignalR WebSockets
- Database: Entity Framework Core with SQLite/PostgreSQL
- Email: SMTP service (Gmail)
- Security: Argon2 hashing, CSRF protection, 2FA, Cloudflare Turnstile
- Passkeys: FIDO2/WebAuthn for passwordless login
🛠️ Technology Stack
Backend
- .NET 9.0: Latest framework
- ASP.NET Core MVC: Web framework
- Entity Framework Core: ORM
- SignalR: Real-time communication
- Argon2: Password hashing
Frontend
- Razor Pages: Server-side rendering
- Bootstrap 5: CSS framework
- jQuery: DOM manipulation
- Vanilla JavaScript: Custom functionality
Database
- SQLite: Development (lightweight)
- PostgreSQL: Production (recommended)
Third-party Services
- Gmail SMTP: Email delivery
- Cloudflare Turnstile: Bot protection (CAPTCHA)
- Railway/Render: Hosting (optional)
🗄️ Database Schema
Core Tables
Users
Id, Username, Email, PasswordHash, EmailVerified, EmailVerifiedAt,
TwoFactorSecret, TwoFactorEnabled, ProfilePictureUrl, BannerImageUrl,
Bio, DisplayName, Birthday, Pronouns, Location, CreatedAt, ...
Posts
Id, UserId, Content, ImageUrl, VideoUrl, MediaType, Hashtags,
Visibility, LikeCount, CommentCount, CreatedAt, UpdatedAt
Messages
Id, SenderId, ReceiverId, Content, ImageUrl, VideoUrl,
IsEncrypted, IsRead, CreatedAt
EncryptionSessions
Id, User1Id, User2Id, User1PublicKey, User2PublicKey,
Status, InitiatedAt, EstablishedAt
Migrations
Run migrations to create/update database schema:
dotnet ef migrations add MigrationName
dotnet ef database update
🔌 API Endpoints
Authentication
POST/Landing/RegisterAjax- Register new userPOST/Landing/LoginAjax- Login userPOST/Landing/Logout- Logout
Posts
POST/Content/CreatePost- Create postGET/Content/GetFeed- Get posts feedPOST/Content/ToggleLike- Like/unlike postPOST/Content/AddComment- Add commentPOST/Content/DeletePost- Delete post
User
GET/User/Profile/{username}- Get profilePOST/User/Follow- Follow userPOST/User/Unfollow- Unfollow userPOST/User/Settings/Account- Update account
Chat (SignalR)
HubSendMessage- Send chat messageHubEstablishEncryption- Start E2E encryptionHubTypingIndicator- Show typing status
secureFetch() wrapper.
🚀 Deployment Guide
Prerequisites
- PostgreSQL database (Railway/Render/AWS RDS)
- SMTP service (Gmail, SendGrid, Mailgun)
- Hosting platform (Railway, Render, Azure, DigitalOcean)
Environment Variables
DATABASE_URL=postgresql://...
EMAIL_SMTP_SERVER=smtp.gmail.com
EMAIL_SMTP_PORT=587
EMAIL_USERNAME=your@email.com
EMAIL_PASSWORD=your-app-password
SECURITY_PEPPER=your-random-pepper-string
Deployment Steps (Railway)
- Create Railway account and project
- Add PostgreSQL service
- Connect GitHub repository
- Set environment variables
- Deploy automatically on push
Database Migration
Migrate from SQLite to PostgreSQL:
- Install Npgsql:
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL - Update connection string in
Program.cs - Export data from SQLite
- Import to PostgreSQL
- Run migrations
appsettings.json with real credentials. Use
environment variables.
🎨 Customization Tips
Branding
- Replace logo in
/wwwroot/images/ - Update colors in
/wwwroot/css/site.css - Modify landing page in
/Views/Landing/Index.cshtml
Adding Features
- New Model: Create in
/Models/, add to DbContext - New Controller: Create in
/Controllers/ - New View: Create in
/Views/ - API Endpoint: Add action in controller
Email Templates
Customize email templates in EmailService.cs:
GetWelcomeEmailTemplate()GetPasswordResetTemplate()GetEmailVerificationTemplate()GetWeeklySummaryTemplate()
❓ Frequently Asked Questions
Need More Help?
Can't find what you're looking for? Our support team is here to help.