A modern, full-stack blog platform built for the TAMID Tech Challenge, featuring user authentication, image uploads, responsive design, and comprehensive content management capabilities.
- Frontend: Deployed on Vercel at https://tamid-tech-blog-challenge.vercel.app
- Backend API: Deployed on Vercel
- Database: Supabase
- ๐ฏ Overview
- ๐ Technologies Used
- ๐ Architecture
- โจ Features
- ๐ Project Structure
- ๐ Installation & Setup
- ๐ API Documentation
- ๐ Database Schema
- ๐ป Development Process
- ๐ง Challenges Faced
- ๐ฎ Future Enhancements
- ๐ค Contributing
The TAMID Tech Blog is a full-stack blogging platform I built for the TAMID Tech Challenge. This blog app includes features such as the ability for a user to upload images, assign tags, make descriptions & titles, filter out the blogs by tags, have other users view public blog posts from other users, and UPDATE, DELETE, READ, AND CREATE blog posts. The home page is dynamic as well as the category cards update dynamically according to new tags made by the users. The Blog application has Google Auth configured meaning that all sign-ins are made through google using supabase's Google OAuth for extra security instead of storing passwords in the database. The entire application is also responsive meaning you can use the application on your phone, and everything is scaled appropriately. I spent a lot of time on this app especially configuring the supabase backend, object storage, auth, and trying to fix the vercel hosting issues for both backend and frontend. I learned a lot and gained a whole new view into full-stack development especially by using new UI libraries like framer-motion which made the UI animation sleek and clean. I have everything documented in this README.md. If you want to host the app yourself locally or if youโre interested in how I made the app feel free to explore this documentation file. Hopefully you like it ๐
- Full-Stack TypeScript Application with type safety throughout
- Modern React Frontend with Framer Motion animations and tailwind css
- RESTful Express.js Backend with API endpoints
- Supabase Integration for authentication, database, and file storage
- Responsive Design optimized for all device sizes (mobile and desktop)
- Image Upload & Management with cloud storage using supabase
- Tag-based Content Organization for easy discovery
- Protected Routes with supabase access tokens to enable authorization of pages logged in and logged out users can access
- React 18 - Modern React with hooks and functional components
- TypeScript - Type-safe JavaScript for better development experience
- Vite - Fast build tool and development server
- React Router DOM - Client-side routing and navigation
- Tailwind CSS - Utility-first CSS framework for styling
- Framer Motion - Smooth animations and transitions
- Lucide React - Beautiful, customizable icons
- Axios - HTTP client for API requests
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- TypeScript - Type-safe server-side development
- Supabase Client - Database and authentication integration
- Multer - File upload middleware
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- UUID - Unique identifier generation
- Supabase - Backend-as-a-Service providing:
- PostgreSQL database
- Authentication & user management
- File storage (images)
- Row Level Security (RLS) policies
- Vercel - Frontend and backend deployment
- Supabase Cloud - Database and storage hosting
- GitHub - Version control and CI/CD integration
- ESLint - Code linting and quality assurance (Very useful)
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixing
- ts-node-dev - TypeScript development server
The application follows a modern full-stack architecture with clear separation of concerns:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ React Client โ โ Express API โ โ Supabase โ
โ โ โ โ โ โ
โ โข Components โโโโโบโ โข Controllers โโโโโบโ โข PostgreSQL โ
โ โข Pages โ โ โข Routes โ โ โข Auth โ
โ โข Context โ โ โข Middleware โ โ โข Storage โ
โ โข Hooks โ โ โข Utils โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
The frontend follows a component-based architecture with:
- Pages: Route-level components (
HomePage,CreatePostPage, etc.) - Components: Reusable UI components (
Navbar,ImageUpload, etc.) - Context: Authentication state management with React Context for authorization of users
- Hooks: Custom hooks for data fetching and state management
- Utils: API client configuration and helper functions
The backend implements a RESTful API with:
- Controllers: Business logic for handling requests
- Routes: API endpoint definitions and middleware application
- Middleware: Authentication, CORS, and error handling (CORS meaning that if a another website tries accessing the database CORS will not allow it and only allow specified websites)
- Utils: Database connection and utility functions
- Types: TypeScript type definitions
- Supabase Authentication with email/password
- Token Management with automatic refresh
- Protected Routes requiring authentication
- User Profile Management with automatic sync
- Session Persistence across browser sessions
- Rich Text Blog Posts with title and content
- Tag System for content categorization
- Public/Private Post Visibility control
- Post CRUD Operations (Create, Read, Update, Delete)
- Author Attribution with user profiles
- Search and Filtering by tags and content
- Multiple Image Upload per post (up to 5 images)
- Drag & Drop Interface for easy uploading
- Image Preview with removal capabilities
- Cloud Storage via Supabase Storage
- Automatic Image Optimization and compression
- Progress Indicators during upload
- Responsive Design for mobile, tablet, and desktop
- Dark Theme with TAMID brand colors
- Smooth Animations using Framer Motion
- Loading States and error handling
- Intuitive Navigation with breadcrumbs
- Modern Card-based Layout for content display
- Tag-based Filtering for easy content discovery
- Featured Content sections
- Recent Posts with chronological ordering
- Author-based Filtering and profiles
- Search Functionality across titles and content
- TAMID Tracks Page showcasing organization programs
- Brand-consistent Design with TAMID colors and styling
- Community Features for member engagement
- Professional Layout suitable for organizational use
TAMID-Tech-Blog-Challenge/
โโโ frontend/ # React TypeScript frontend
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ Navbar.tsx # Navigation component
โ โ โ โโโ ImageUpload.tsx # Image upload functionality
โ โ โ โโโ ImageGallery.tsx # Image display component
โ โ โ โโโ ProtectedRoute.tsx # Route protection
โ โ โ โโโ GoogleLogin.tsx # OAuth integration
โ โ โโโ pages/ # Route-level components
โ โ โ โโโ HomePage.tsx # Main blog listing
โ โ โ โโโ CreatePostPage.tsx # Post creation/editing
โ โ โ โโโ PostDetailPage.tsx # Individual post view
โ โ โ โโโ MyPostsPage.tsx # User's posts management
โ โ โ โโโ LoginPage.tsx # Authentication
โ โ โ โโโ RegisterPage.tsx # User registration
โ โ โ โโโ TracksPage.tsx # TAMID tracks information
โ โ โ โโโ NotFoundPage.tsx # 404 error page
โ โ โโโ context/ # React Context providers
โ โ โ โโโ auth/ # Authentication context
โ โ โ โโโ authProvider.tsx # Auth state management
โ โ โ โโโ supabaseClient.tsx # Supabase configuration
โ โ โโโ lib/ # Utility libraries
โ โ โ โโโ api.ts # Axios configuration
โ โ โโโ assets/ # Static assets
โ โ โโโ App.tsx # Main application component
โ โ โโโ main.tsx # Application entry point
โ โ โโโ index.css # Global styles
โ โโโ package.json # Frontend dependencies
โ โโโ vite.config.ts # Vite configuration
โ โโโ tailwind.config.js # Tailwind CSS configuration
โ โโโ tsconfig.json # TypeScript configuration
โโโ backend/ # Express TypeScript backend
โ โโโ src/
โ โ โโโ controllers/ # Request handlers
โ โ โ โโโ authController.ts # Authentication logic
โ โ โ โโโ postController.ts # Blog post operations
โ โ โ โโโ imageController.ts # Image upload handling
โ โ โโโ routes/ # API route definitions
โ โ โ โโโ authRoutes.ts # Authentication endpoints
โ โ โ โโโ postRoutes.ts # Blog post endpoints
โ โ โ โโโ imageRoutes.ts # Image upload endpoints
โ โ โโโ middleware/ # Express middleware
โ โ โ โโโ authMiddleware.ts # JWT verification
โ โ โโโ utils/ # Utility functions
โ โ โ โโโ supabase.ts # Supabase client configuration
โ โ โโโ types/ # TypeScript type definitions
โ โ โโโ index.ts # Server entry point
โ โโโ package.json # Backend dependencies
โ โโโ vercel.json # Vercel deployment configuration
โ โโโ tsconfig.json # TypeScript configuration
โโโ README.md # Project documentation
- Node.js (v18 or higher)
- npm or yarn
- Supabase Account for database and authentication
- Vercel Account for deployment (optional)
git clone https://github.com/your-username/TAMID-Tech-Blog-Challenge.git
cd TAMID-Tech-Blog-Challengecd backend
npm installCreate a .env file in the backend directory:
# Supabase Configuration
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
# Server Configuration
PORT=5001
NODE_ENV=developmentcd ../frontend
npm installCreate a .env file in the frontend directory:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# API Configuration
VITE_API_BASE_URL=http://localhost:5001/apiSet up the following tables in your Supabase project:
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);CREATE TABLE posts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title TEXT NOT NULL,
content TEXT NOT NULL,
author_id UUID REFERENCES users(id) ON DELETE CASCADE,
is_public BOOLEAN DEFAULT true,
images TEXT[],
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);CREATE TABLE tags (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT UNIQUE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);CREATE TABLE post_tags (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
post_id UUID REFERENCES posts(id) ON DELETE CASCADE,
tag_id UUID REFERENCES tags(id) ON DELETE CASCADE,
UNIQUE(post_id, tag_id)
);Create a storage bucket named blog-images in your Supabase project for image uploads.
Start the backend server:
cd backend
npm run devStart the frontend development server:
cd frontend
npm run devThe application will be available at:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:5001
The application uses a PostgreSQL database hosted on Supabase with the following schema:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ users โ โ posts โ โ post_tags โ โ tags โ
โโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโค
โ id (PK) โโโโโโ id (PK) โโโโโโ id (PK) โโโโโบโ id (PK) โ
โ name โ โโ author_id โ โโ post_id โโ โ name โ
โ email โ โ title โ โ tag_id โโ โ created_at โ
โ created_at โ โ content โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ updated_at โ โ is_public โ
โโโโโโโโโโโโโโโ โ images โ
โ created_at โ
โ updated_at โ
โโโโโโโโโโโโโโโ
- users: Stores user account information synced from Supabase Auth
- posts: Contains blog post content with author relationships
- tags: Manages content categorization tags
- post_tags: Junction table for many-to-many post-tag relationships
The development of this blog platform was guided by several key principles:
- Type Safety First: Extensive use of TypeScript throughout the stack so that I can keep track of what variable is what (VERY HARD TO DO IN JAVASCRIPT)
- Component Reusability: Modular React components for maintainability
- Performance Optimization: Lazy loading, optimistic updates, and efficient queries
- User Experience: Smooth animations, loading states, and intuitive navigation
- Security: token authentication, input validation, and secure file uploads with multer
The frontend follows React best practices with:
- Functional Components: Using React hooks for state management
- Custom Hooks: Extracting reusable logic into custom hooks
- Context API: Managing global authentication state
- Component Composition: Building complex UIs from simple components
- Type-Safe Props: Comprehensive TypeScript interfaces
The backend implements clean architecture principles:
- Controller Pattern: Separating business logic from route handling
- Middleware Chain: Modular request processing
- Error Handling: Comprehensive error catching and user-friendly responses
- Input Validation: Server-side validation for all endpoints
- Database Abstraction: Using Supabase client for consistent data access
- Planning: Feature requirements and API design
- Backend Development: API endpoints and database schema
- Frontend Development: UI components and user interactions
- Integration: Connecting frontend and backend
- Testing: Manual testing and bug fixes
- Deployment: Vercel deployment and environment configuration
Challenge: Integrating Supabase authentication with custom backend API in a production environment while maintaining security.
Solution: This was a bit of tedious task in my opinion as I had the authentication set up on my local machine, but it wasnโt working on vercel which I was very confused with at first. But the solution was actually very simple it was basically having envs for the BASE_URL for the backend api route so all I had to do was in vercel in the env section I just had to change those envs. The same thing I had to do with Google cloud console and configure the redirect URLs and do it in supabase as well (which took me a bit of time to notice). Also, another thing was that the redirect url in the code had to be saved to local storage that way all the application had to do was getItem in localStorage and would have the link ready and redirect to that.
Challenge: Implementing a robust image upload system with progress tracking, validation, and cloud storage.
Solution: I had to create an image upload component with:
- File type and size validation
- Progress tracking during upload
- Preview functionality with removal options
- Integration with Supabase Storage for cloud hosting
- Very hard to do especially configuring wit supabase storage buckets had to look through supabase documentation to figure it out
Challenge: Creating a consistent, responsive design that works across all device sizes.
Solution: Utilized Tailwind CSS's responsive utilities with a mobile-first approach, implementing custom breakpoints and flexible grid layouts that adapt to different screen sizes. Used keywords such as md: sm: and lg: to do this. Sort of annoying to have to format everything on the website since I was using framer-motion libraries as well.
Given more time and resources, the following features would enhance the platform:
- Rich Text Editor: WYSIWYG editor with formatting options
- Code Syntax Highlighting: Support for code blocks with language-specific highlighting
- Draft System: Save posts as drafts before publishing
- Post Scheduling: Schedule posts for future publication
- Comment System: User comments and discussions on posts
- Real-time Notifications: Live updates for new posts and interactions
- Advanced Search: Full-text search with filters and sorting options
- Bookmarking: Save favorite posts for later reading
- Reading Progress: Track reading progress on long posts
- Dark/Light Theme Toggle: User preference for theme selection
- User Profiles: Detailed author profiles with bio and social links
- Following System: Follow favorite authors
- Post Sharing: Social media integration for sharing posts
- Like/Reaction System: User engagement metrics
- Newsletter Subscription: Email notifications for new content
- Progressive Web App: Offline reading capabilities
- Performance Optimization: Image lazy loading, code splitting
- SEO Enhancement: Meta tags, structured data, sitemap generation
- API Rate Limiting: Prevent abuse and ensure fair usage
- Comprehensive Testing: Unit tests, integration tests, E2E tests
- Third-party Authentication: Google, GitHub, LinkedIn login
- Content Import/Export: Migrate content from other platforms
- Webhook Support: Integration with external services
- API Documentation: Interactive API documentation with Swagger
- Mobile App: React Native mobile application
This project was developed as part of the TAMID Tech Track application process. This codebase demonstrates my proficiency in modern web development technologies and best practices. Hopefully you enjoyed reading through this :)
- TypeScript: Strict type checking enabled
- ESLint: Code linting for consistency
- Component Documentation: Clear prop interfaces and comments
- Error Handling: Comprehensive error catching and user feedback
- Security: Input validation and authentication checks
- TAMID Organization for providing the opportunity to build this project
- Supabase for the excellent backend-as-a-service platform (really grateful for this service honestly)
- Vercel for seamless deployment and hosting
- React Community for the amazing ecosystem of tools and libraries
Built with โค๏ธ for TAMID Tech