This document outlines the major updates made to transform the DNA Forge Hub from a static website to a fully dynamic, admin-managed content platform.
File Modified: src/components/About.tsx
- Removed: GSSOC DASHBOARD and OSCI DASHBOARD cards from the main grid
- Replaced with: RESOURCES card that links to the new content management page
- Impact: Simplified navigation and focused on internal content management
Files Modified:
src/types/admin.tsdatabase-update.sql(new file)
New Content Types Added:
hackathon- For managing hackathon eventsopportunity- For job/internship opportunitiespdf- For PDF documents and resourcesvideo- For video tutorials and contentroadmap- For learning roadmaps and guides
New Database Fields:
external_url- Links to external resourcesdifficulty- Difficulty level (beginner/intermediate/advanced)deadline- Deadlines for applications/submissionsprize- Prize information for hackathonscompany- Company name for opportunities
File Modified: src/pages/Hackathons.tsx
- Added: Dynamic content loading from admin system
- Features:
- Displays admin-created hackathon content
- Shows prize information, deadlines, difficulty levels
- External registration links
- Tag system for categorization
- Featured content highlighting
- Loading and empty states
File Modified: src/pages/Opportunities.tsx
- Added: Dynamic content loading for opportunities
- Features:
- Company information display
- Application deadlines
- Difficulty level indicators
- External application links
- Tag-based categorization
- Loading and empty states
File Created: src/pages/ContentPage.tsx
- Purpose: Dedicated page for PDFs, videos, and roadmaps
- Features:
- Tabbed interface for different content types
- External link handling
- Download functionality for PDFs
- Tag-based organization
- Featured content highlighting
- Responsive design
File Modified: src/components/admin/ContentManager.tsx
- Added new content type filters
- Enhanced filtering capabilities
File Modified: src/components/admin/ContentEditor.tsx
- New Form Fields:
- External URL input (conditional)
- Difficulty level selector
- Deadline date picker
- Prize information input
- Company name input
- Conditional Field Display: Fields appear based on selected content type
File Modified: src/lib/admin.ts
- Updated:
getPublishedContent()function to support type filtering - Added: Optional type parameter for content filtering
File Created: database-update.sql
- Extended
content_itemstable with new columns - Updated type constraints
- Added database indexes for performance
- Added field comments for documentation
File Modified: src/App.tsx
- Added route for new Content page (
/content)
-
Creating Hackathons:
- Go to Admin Dashboard → Content Manager
- Click "Create Content"
- Select "Hackathon" as type
- Fill in title, description, prize, deadline, difficulty
- Add external registration URL
- Publish when ready
-
Creating Opportunities:
- Select "Opportunity" as type
- Fill in company name, application deadline
- Add difficulty level and external application URL
- Use tags for skill requirements
-
Adding Learning Resources:
- PDFs: Select "PDF" type, add external URL to document
- Videos: Select "Video" type, add YouTube/video URL
- Roadmaps: Select "Roadmap" type, add roadmap.sh or custom URL
- Viewing Hackathons: Visit
/hackathonsto see active competitions - Browsing Opportunities: Visit
/opportunitiesfor jobs and internships - Accessing Resources: Visit
/contentfor PDFs, videos, and roadmaps - Quick Access: Use the RESOURCES card on the main page
- Dynamic Content: No more hardcoded data - all content is admin-manageable
- Scalability: Easy to add new content types and fields
- User Experience: Better organization and discovery of content
- Admin Efficiency: Streamlined content creation workflow
- SEO Friendly: Better content structure and organization
- Content Analytics: Track views and engagement
- User Favorites: Allow users to save content
- Advanced Search: Full-text search across all content
- Content Scheduling: Auto-publish at specified times
- Content Versioning: Track changes and revisions
Run the database-update.sql file on your Supabase instance to add the new columns and constraints:
-- Run this in your Supabase SQL editor
-- The file contains all necessary ALTER TABLE statements- Admin can create hackathon content
- Admin can create opportunity content
- Admin can create PDF/video/roadmap content
- Hackathons page displays dynamic content
- Opportunities page displays dynamic content
- Content page works with tabs
- External links work correctly
- Featured content appears prominently
- Loading states display properly
- Empty states show when no content available
These updates transform DNA Forge Hub into a fully dynamic content management platform, eliminating the need for developers to hardcode content changes. The admin system provides a user-friendly interface for content creation while maintaining the site's modern design and user experience.