Skip to content

yashthorat7/techathons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

88 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Techathons: The Ultimate Resource Hub

Techathons Dashboard

Techathons is a high-performance, aesthetically pleasing resource management platform designed for developers and tech enthusiasts. It serves as a centralized hub for organizing techathons, hackathons, AI tools, code snippets, and essential web resources. Built with a focus on speed, modern design, and intelligent interactions.

React Express TailwindCSS Neon AI

✨ Features & Highlights

πŸ—‚ Resource Management (Cards)

  • Categorized Hub: Organize resources into tabs like "Websites", "Components", "AI Tools", "Snippets", and "Tutorials".
  • Real-time Search: Instantaneous search across all resources with a dedicated backdrop-blur modal.
  • Dynamic Grid: A responsive grid layout that adapts to different screen sizes, featuring "Recently Used" tracking.
  • CRUD Operations: Fully functional backend for creating, reading, updating, and deleting resource cards.
  • Rich Previews: Every card supports high-quality images, external links, and detailed markdown-ready descriptions.

πŸ€– Intelligent AI Assistant

  • Integrated Chat: A dedicated AI box powered by Groq (Llama 3.1 8B) for quick queries and brainstorming.
  • Context-Aware: The AI is tuned to provide concise, friendly, and structured advice for developers.
  • Seamless UI: Transparent backdrop-blur chat interface that doesn't break the user's flow.
  • Auto-expanding Input: Intelligent input box that grows with your text, providing a natural chat experience.

πŸ’¬ Collaboration & Community

  • Collab Box: A real-time (database-backed) chat system for users to share ideas and discuss resources.
  • Message History: Persistent chat threads that allow users to catch up on recent developer discussions.
  • Recent Activity: Keeps track of the most recently visited cards for quick access, synced across sessions.

πŸ”’ Security & Privacy

  • Gatekeeper Screen: A sleek password-protected entry screen ensures that the platform remains private or restricted to authorized users.
  • Environment Driven: Sensitive configurations like API keys and database URLs are managed via robust .env configurations.
  • CORS Restricted: Backend is configured to only allow requests from the official frontend origin.

🎨 Premium Aesthetics

  • Paper Texture UI: A unique, high-fidelity design system utilizing paper-like textures and sleek borders.
  • Smooth Animations: Leverages Tailwind CSS 4 for state-of-the-art transitions and micro-interactions.
  • Dark/Glassmorphism: A modern aesthetic featuring deep blacks, subtle blurs, and vibrant accents.
  • Custom Scrollbars: Minimalist, non-intrusive scrollbars for a premium feel.

πŸ›  Tech Stack

Frontend

  • Framework: React 19 (Fiber architecture, concurrent rendering)
  • Styling: Tailwind CSS v4 (Pure CSS variables, blazing-fast compile times, zero-runtime)
  • State Management: React Context API
    • AuthContext: Authentication lifecycle.
    • CardsContext: Resource data fetching and synchronization.
    • ModalContext: UI state for overlays and dialogs.
    • TabsContext: Filtering and view logic.
  • Icons: Lucide React (Tree-shakeable SVG icons)
  • Notifications: React Hot Toast (Lightweight and accessible toast notifications)
  • Networking: Axios (With interceptors and base configurations)
  • Build Tool: Vite (Lightning-fast HMR)

Backend

  • Runtime: Node.js (Version 18.x+)
  • Framework: Express.js (Version 5.1 Alpha/Stable)
  • Database: Neon (Serverless Postgres with autoscaling storage)
  • AI Engine: Groq SDK (Powered by Llama 3.1 8B Instant)
  • ORM/Query: Raw SQL with tagged templates for maximum control and security against SQL injection.
  • Development: Nodemon (Auto-restart on file changes)

πŸ“‚ Project Structure

techathons/
β”œβ”€β”€ backend/                # Express.js Server
β”‚   β”œβ”€β”€ config/             # Database & global configurations
β”‚   β”‚   └── db.js           # Neon client init & table creation
β”‚   β”œβ”€β”€ controllers/        # Request handlers & logic
β”‚   β”‚   β”œβ”€β”€ aiController.js # AI Chat logic
β”‚   β”‚   β”œβ”€β”€ cardController  # CRUD for resources
β”‚   β”‚   └── chatController  # Collab chat logic
β”‚   β”œβ”€β”€ routes/             # API Endpoints definition
β”‚   β”œβ”€β”€ services/           # Core business logic
β”‚   β”‚   β”œβ”€β”€ aiService.js    # Groq integration
β”‚   β”‚   β”œβ”€β”€ cardServices/   # Card logic + In-memory cache
β”‚   β”‚   └── chatService.js  # Persistence for collab chat
β”‚   β”œβ”€β”€ utils/              # Helper functions & data seeders
β”‚   └── server.js           # Entry point and middleware setup
β”œβ”€β”€ frontend/               # React Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/         # Base UI primitives (modals, grids)
β”‚   β”‚   β”‚   β”œβ”€β”€ Card.jsx    # Individual resource item
β”‚   β”‚   β”‚   β”œβ”€β”€ AiBox.jsx   # AI overlay
β”‚   β”‚   β”‚   └── Tabs.jsx    # Category navigation
β”‚   β”‚   β”œβ”€β”€ context/        # React Providers
β”‚   β”‚   β”œβ”€β”€ page/           # Main Application Pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   └── PasswordScreen.jsx
β”‚   β”‚   β”œβ”€β”€ store/          # Local persistence utilities
β”‚   β”‚   └── App.jsx         # Root component
β”‚   └── index.html          # HTML Entry
└── README.md               # Extensive documentation

πŸš€ Getting Started

Prerequisites

  • Node.js: v18.x or higher
  • Postgres: A Neon DB account (or any standard Postgres instance)
  • Groq API Key: Obtain from Groq Console

Installation

  1. Clone the repository:

    git clone https://github.com/yashthorat7/Techathons.git
    cd techathons
  2. Setup Backend:

    cd backend
    npm install

    Create a .env file in the backend/ directory:

    PORT=3000
    DATABASE_URL=postgres://USER:PASSWORD@HOST/DB?sslmode=require
    GROQ_API_KEY=gsk_your_key_here
    ALLOWED_ORIGIN=http://localhost:5173
  3. Setup Frontend:

    cd ../frontend
    npm install

    Create a .env file in the frontend/ directory:

    VITE_BACKEND_URL=http://localhost:3000
    VITE_AUTH_PASSWORD=your_secure_password

Running the App

  1. Start the Backend:

    cd backend
    npm run dev
  2. Start the Frontend:

    cd frontend
    npm run dev
  3. Access the app at http://localhost:5173. Use your VITE_AUTH_PASSWORD to unlock the dashboard.


🧩 Detailed System Overview

πŸ’‘ AI Intelligence Layer

The AI Assistant is not just a wrapper. It uses a specialized system prompt that instructs the model to act as a CASUAL developer friend. It avoids verbose intros/outros and focuses on:

  • Code clarity.
  • Concise one-liners.
  • Technical accuracy.
  • Context-retention by sending the last 10 messages of history.

πŸ›‘ Security Protocol

The PasswordScreen.jsx acts as a full-page barrier. The app uses AuthContext to track the isAuthenticated state. Even if a user manages to bipass the UI, the backend checks for environment-level authorization (where applicable) and enforces CORS to prevent unauthorized cross-origin requests.

⚑ Performance & Caching

In-memory caching is implemented in cardCacheService.js. When getAllCards is called, the server first checks the local volatile memory. This results in sub-10ms response times for repeat requests. The cache is automatically purged when any mutation (POST/PUT/DELETE) occurs, ensuring data consistency.


πŸ— Component Breakdown

Core Components

  • Navbar: Sticky header with logo and primary actions.
  • Tabs: Dynamically generated based on available resource tags.
  • Grid: Uses CSS Grid for responsive layout, handling variable card sizes.
  • Card: The main data entry, featuring:
    • Conditional Rendering: Handles links, images, and descriptions dynamically.
    • Tooltips: For long descriptions.
    • Edit/Delete Actions: Quick management buttons.

Modals

  • SearchModal: Global shortcut (Ctrl+K logic ready) for finding resources.
  • CardModal: Full-screen view with markdown support for descriptions.
  • CardForm: Validated form for submitting new resources to the database.

πŸ“‘ API Reference

🎫 Cards Endpoint

Method Endpoint Description
GET /api/cards Fetch all resources (cached)
GET /api/cards/:id Fetch detailed card data
POST /api/cards Add new resource
PUT /api/cards/:id Update existing resource
DELETE /api/cards/:id Permanent removal

πŸ€– AI Endpoint

Method Endpoint Description
POST /api/ai Interact with Llama 3.1

πŸ’¬ Chat Endpoint

Method Endpoint Description
GET /api/chats Retrieve global collab history
POST /api/chats Broadcast a new message

πŸ”’ License & Usage

This project is Proprietary and Confidential. All rights reserved. Unauthorized copying, distribution, or use of this codebase is strictly prohibited. For access or inquiries, please contact the repository owner.


❀️ Developed By

πŸ‘¨β€πŸ’» Yash Thorat

Feel free to suggest improvements, or report issues!

⭐ Don't forget to star this repository if you find it useful!

About

Techathons is a high-fidelity resource hub for developers to organize hackathons, AI tools, and code snippets, featuring a sleek paper-texture design, real-time search, and an integrated Llama-3-powered assistant.

Topics

Resources

Stars

Watchers

Forks

Contributors