A modern, full-stack blog platform built with Node.js, Express, and Supabase. DigiteX provides an elegant interface for creating, managing, and displaying technology articles with a focus on AI, Business, and Medicine.
- Modern UI/UX: Dark theme with elegant navigation and responsive design
- Rich Text Editor: Summernote WYSIWYG editor for content creation
- Article Display: Professional blog layout with syntax highlighting
- Category Filtering: Filter articles by department (AI, Business, Medicine)
- Mobile Responsive: Optimized for all device sizes
- Express.js Server: RESTful API with proper error handling
- Supabase Integration: PostgreSQL database with real-time capabilities
- Authentication: Secure login system with session management
- Content Management: Full CRUD operations for articles
- Real-time Features: Live article submission and display
- Syntax Highlighting: Enhanced code block display
- Table Support: Styled tables for data presentation
- Blockquotes: Elegant quote formatting
- Image Support: Responsive image handling
- Reading Time: Automatic calculation based on word count
- Backend: Node.js, Express.js
- Database: Supabase (PostgreSQL)
- Frontend: EJS templating, Vanilla JavaScript
- Styling: Custom CSS with modern design patterns
- Authentication: Supabase Auth
- Editor: Summernote WYSIWYG
- Environment: Environment variables with dotenv
DigiteX/
βββ server.js # Main Express server
βββ package.json # Dependencies and scripts
βββ .env # Environment variables (not tracked)
βββ views/ # EJS templates and static assets
βββ index.ejs # Homepage
βββ login.ejs # Authentication page
βββ authorportal.ejs # Author dashboard
βββ blogwrite.ejs # Article creation interface
βββ blogdisplay.ejs # Individual article view
βββ blog.ejs # Articles listing page
βββ logo.png # Platform logo
βββ bg.jpg # Background images
βββ login.jpg # Login page background
βββ digifont.ttf # Custom font
# Custom font
- Node.js (v16 or higher)
- npm or yarn
- Supabase account and project
-
Clone the repository
git clone https://github.com/Vasipallie/DigiteX.git cd DigiteX -
Install dependencies
npm install
-
Set up environment variables Create a
.envfile in the root directory:SUPALINK=your_supabase_url SUPAKEY=your_supabase_anon_key
-
Database Setup Create the following tables in your Supabase database::
Users Table:
CREATE TABLE Users ( id UUID PRIMARY KEY REFERENCES auth.users(id), name TEXT NOT NULL, created_at TIMESTAMP DEFAULT NOW() );;
Articles Table:
CREATE TABLE Articles ( id SERIAL PRIMARY KEY, title TEXT NOT NULL, html TEXT NOT NULL, department TEXT NOT NULL, timestamp TIMESTAMP DEFAULT NOW(), author_id UUID REFERENCES Users(id) );;
-
Start the development server
npm start # or node server.jss -
Open your browser Navigate to
http://localhost:3000
| Column | Type | Description |
|---|---|---|
| id | UUID | Primary key, references auth.users |
| name | TEXT | User's display name |
| created_at | TIMESTAMP | Account creation time |
| Column | Type | Description |
|---|---|---|
| id | SERIAL | Primary key |
| title | TEXT | Article title |
| html | TEXT | Article content (HTML) |
| department | TEXT | Category (AI, Business, Medicine) |
| timestamp | TIMESTAMP | Publication time |
| author_id | UUID | Foreign key to Users |
- Primary: Dark theme (#000000)
- Accent: Teal/Blue gradients (#28829e, #4971ed)
- Text: White/Light gray hierarchy
- Borders: Subtle gray tones (#333, #444)
- Headers: Custom DigiteX font
- Body: Be Vietnam Pro
- Code: Courier New monospace
- Sidebar Navigation: Modern left sidebar with icons
- Article Cards: Hover effects and smooth transitions
- Rich Editor: Full-featured Summernote integration
- Responsive Tables: Styled data presentation
GET /- HomepageGET /blog- Articles listingGET /article/:id- Individual article viewGET /login- Authentication page
GET /authorportal- Author dashboardGET /New- Article creation pagePOST /submit-article- Create new articlePOST /login- User authentication
- Navigate to
/loginand authenticate - Access the author portal at
/authorportal - Click "New Post" to open the editor
- Use the Summernote editor for rich content
- Select department and add title
- Submit article for publication
- Bold/Italic: Standard formatting options
- Headers: H1-H6 support with custom styling
- Lists: Ordered and unordered lists
- Code Blocks: Syntax highlighting with
tagsre>
- Tables: Responsive table formatting
- Blockquotes: Elegant quote styling
- Images: Upload and embed support
- Session Management: Secure cookie-based sessions
- Authentication: Supabase Auth integration
- Input Validation: Server-side validation
- XSS Prevention: HTML sanitization
- CORS Protection: Configured headers
NODE_ENV=production
SUPALINK=your_production_supabase_url
SUPAKEY=your_production_supabase_key
PORT=3000