Skip to content

Latest commit

 

History

History
173 lines (136 loc) · 5.94 KB

File metadata and controls

173 lines (136 loc) · 5.94 KB

DNA Forge Hub - Content Management System Updates

Overview

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.

Changes Made

1. Removed OSCI and GSSOC Dashboard Cards

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

2. Extended Admin Content Types

Files Modified:

  • src/types/admin.ts
  • database-update.sql (new file)

New Content Types Added:

  • hackathon - For managing hackathon events
  • opportunity - For job/internship opportunities
  • pdf - For PDF documents and resources
  • video - For video tutorials and content
  • roadmap - For learning roadmaps and guides

New Database Fields:

  • external_url - Links to external resources
  • difficulty - Difficulty level (beginner/intermediate/advanced)
  • deadline - Deadlines for applications/submissions
  • prize - Prize information for hackathons
  • company - Company name for opportunities

3. Enhanced Hackathons Page

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

4. Enhanced Opportunities Page

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

5. New Content Management Page

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

6. Updated Admin Components

ContentManager Component

File Modified: src/components/admin/ContentManager.tsx

  • Added new content type filters
  • Enhanced filtering capabilities

ContentEditor Component

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

7. Enhanced Data Access Layer

File Modified: src/lib/admin.ts

  • Updated: getPublishedContent() function to support type filtering
  • Added: Optional type parameter for content filtering

8. Database Schema Updates

File Created: database-update.sql

  • Extended content_items table with new columns
  • Updated type constraints
  • Added database indexes for performance
  • Added field comments for documentation

9. Navigation Updates

File Modified: src/App.tsx

  • Added route for new Content page (/content)

Usage Instructions

For Administrators

  1. 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
  2. Creating Opportunities:

    • Select "Opportunity" as type
    • Fill in company name, application deadline
    • Add difficulty level and external application URL
    • Use tags for skill requirements
  3. 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

For Users

  1. Viewing Hackathons: Visit /hackathons to see active competitions
  2. Browsing Opportunities: Visit /opportunities for jobs and internships
  3. Accessing Resources: Visit /content for PDFs, videos, and roadmaps
  4. Quick Access: Use the RESOURCES card on the main page

Technical Benefits

  1. Dynamic Content: No more hardcoded data - all content is admin-manageable
  2. Scalability: Easy to add new content types and fields
  3. User Experience: Better organization and discovery of content
  4. Admin Efficiency: Streamlined content creation workflow
  5. SEO Friendly: Better content structure and organization

Future Enhancements

  1. Content Analytics: Track views and engagement
  2. User Favorites: Allow users to save content
  3. Advanced Search: Full-text search across all content
  4. Content Scheduling: Auto-publish at specified times
  5. Content Versioning: Track changes and revisions

Database Migration

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

Testing Checklist

  • 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

Conclusion

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.