A premium, modern web application for discovering and exploring curated technical resources
Live Demo β’ Report Bug
DPC Recommends is a production-ready, full-stack web application designed to showcase a curated library of 300+ high-quality technical resources. Built with modern web technologies, it features a polished user experience with advanced search capabilities, intelligent filtering, and premium animationsβall optimized for performance and accessibility.
The platform offers both authenticated access for full functionality and a sneak peek mode for unauthenticated visitors, encouraging user engagement while maintaining content value.
- Premium UI/UX: Smooth framer-motion animations, interactive parallax effects, and micro-interactions
- Advanced Search: Global search with keyboard shortcuts (βK), fuzzy matching across multiple fields
- Smart Authentication: Seamless Supabase authentication with protected routes and sneak peek content
- Performance Optimized: React Query caching, optimized database queries, lazy loading, and GPU-accelerated animations
- Production Ready: Comprehensive error handling, security headers, RLS policies, and accessibility features
- Developer Experience: Full TypeScript coverage, reusable components, extensive documentation
- Email/Password Authentication powered by Supabase Auth
- Sneak Peek Mode for unauthenticated users (limited preview content)
- Protected Routes with automatic redirects
- Session Management with persistent login state
- Newsletter Integration for user engagement
- Global Search Modal with keyboard shortcuts (βK / Ctrl+K)
- Multi-field Search: Title, author, source, publisher, topics, and key takeaways
- Real-time Results with debounced input
- Search Highlighting in results
- Multi-select Filters: Topics, difficulty, content type, categories, and subcategories
- Dynamic Filter Options populated from database
- Active Filter Badges with one-click removal
- Multiple Sort Options: Date added, rating, title, difficulty
- Sort Direction Toggle: Ascending/descending
- Framer Motion Animations: Page transitions, card reveals, button interactions
- Interactive Parallax on hero section (mouse-tracking)
- Smooth Transitions: 60fps GPU-accelerated animations
- Dark/Light Mode with system preference detection
- Responsive Design: Mobile-first, touch-optimized
- Accessibility: Reduced motion support, ARIA labels, keyboard navigation
- React Query: Smart caching, background refetching, stale-while-revalidate
- Optimized Images: Next.js image optimization
- Database Indexing: Fast queries with GIN and B-tree indexes
- Code Splitting: Automatic route-based splitting
- Edge-Ready: Deployable to Vercel Edge Network
- Row Level Security (RLS): Database-level access control
- Input Sanitization: XSS protection on all user inputs
- Security Headers: CSP, HSTS, X-Frame-Options
- Environment Variables: Secure credential management
- Public Read-Only: Controlled data exposure
| Technology | Purpose | Version |
|---|---|---|
| Next.js | React framework with App Router, SSR, and API routes | 14.0+ |
| React | UI component library | 18.2+ |
| TypeScript | Type-safe development | 5.3+ |
| Tailwind CSS | Utility-first styling framework | 3.4+ |
| Framer Motion | Production-ready animation library | 12.23+ |
| Lucide React | Beautiful icon set | 0.303+ |
| Technology | Purpose |
|---|---|
| Supabase | PostgreSQL database, authentication, and real-time subscriptions |
| @supabase/supabase-js | Official Supabase JavaScript client |
| Row Level Security | Database-level authorization |
| Technology | Purpose |
|---|---|
| TanStack Query (React Query) | Async state management, caching, and synchronization |
| Custom Hooks | Reusable data fetching logic |
| Technology | Purpose |
|---|---|
| Zod | Runtime type validation |
| date-fns | Modern date manipulation |
| clsx | Conditional className composition |
| Tool | Purpose |
|---|---|
| ESLint | Code quality and consistency |
| PostCSS | CSS transformations |
| Autoprefixer | CSS vendor prefixing |
| tsx | TypeScript execution for scripts |
- Node.js 18.x or higher
- npm or yarn or pnpm
- Supabase Account (free tier available)
Already have a database? Skip to QUICK_START.md
git clone https://github.com/Mahaprasad003/DPC-Recommends.git
cd DPC-Recommendsnpm installCreate .env.local in the project root:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-hereπ‘ Find these in your Supabase project: Settings β API
Run the following SQL in your Supabase SQL Editor:
-- Create technical_content table
CREATE TABLE technical_content (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title TEXT NOT NULL,
url TEXT NOT NULL,
author TEXT,
source TEXT,
topics TEXT[],
tag_categories TEXT[],
tag_subcategories TEXT[],
difficulty TEXT,
content_type TEXT,
rating NUMERIC(3,2),
key_takeaways TEXT[],
date_added TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
publisher TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Enable Row Level Security
ALTER TABLE technical_content ENABLE ROW LEVEL SECURITY;
-- Allow public read access (authenticated users only)
CREATE POLICY "Authenticated users can view all content"
ON technical_content FOR SELECT
TO authenticated
USING (true);
-- Create sneak peek policy (unauthenticated users see limited content)
CREATE POLICY "Public can view sneak peek content"
ON technical_content FOR SELECT
TO anon
USING (id IN (
SELECT id FROM technical_content
ORDER BY date_added DESC
LIMIT 6
));
-- Performance indexes
CREATE INDEX idx_technical_content_title ON technical_content(title);
CREATE INDEX idx_technical_content_topics ON technical_content USING GIN(topics);
CREATE INDEX idx_technical_content_tag_categories ON technical_content USING GIN(tag_categories);
CREATE INDEX idx_technical_content_tag_subcategories ON technical_content USING GIN(tag_subcategories);
CREATE INDEX idx_technical_content_difficulty ON technical_content(difficulty);
CREATE INDEX idx_technical_content_content_type ON technical_content(content_type);
CREATE INDEX idx_technical_content_date_added ON technical_content(date_added DESC);
CREATE INDEX idx_technical_content_rating ON technical_content(rating DESC);npm run devπ Open http://localhost:3000
dpc-recommends/
βββ π app/ # Next.js App Router
β βββ layout.tsx # Root layout with theme provider
β βββ page.tsx # Homepage with search, filters, grid
β βββ providers.tsx # React Query provider
β βββ globals.css # Global styles + animations
β βββ actions/ # Server actions
β β βββ cache.ts # Revalidation actions
β βββ api/ # API routes
β β βββ resources/ # Fetch resources
β β βββ resource-options/ # Filter options
β β βββ sneak-peek/ # Unauthenticated preview
β β βββ verify/ # DB verification
β β βββ revalidate/ # Cache invalidation
β βββ auth/callback/ # Auth callback handler
β
βββ π components/
β βββ ui/ # Base UI components
β β βββ Button.tsx # Button with variants
β β βββ Input.tsx # Styled input field
β β βββ Card.tsx # Card container
β β βββ Badge.tsx # Status badges
β β βββ Tag.tsx # Content tags
β β βββ Select.tsx # Dropdown select
β β
β βββ features/ # Feature components
β β βββ ResourceCard.tsx # Individual resource card
β β βββ CardGrid.tsx # Grid layout with animations
β β βββ SearchBar.tsx # Search with global modal
β β βββ FilterPanel.tsx # Advanced filtering UI
β β βββ HeroSection.tsx # Landing hero with parallax
β β βββ GlobalSearch.tsx # Keyboard-accessible search
β β
β βββ layout/ # Layout components
β β βββ Header.tsx # Navigation + auth
β β βββ Footer.tsx # Footer section
β β
β βββ auth/ # Authentication components
β β βββ LoginModal.tsx # Sign in/up modal
β β
β βββ admin/ # Admin components
β βββ AdminPanel.tsx # Admin interface
β βββ AdminPanelWrapper.tsx # Admin wrapper with checks
β
βββ π lib/
β βββ supabase/ # Supabase configuration
β β βββ client.ts # Client-side Supabase
β β βββ server.ts # Server-side Supabase
β β
β βββ hooks/ # Custom React hooks
β β βββ useResources.ts # Resource fetching + caching
β β βββ useAuth.ts # Authentication state
β β βββ useSneakPeekContent.ts # Sneak peek data
β β
β βββ utils/ # Utility functions
β βββ animations.ts # Framer Motion variants
β βββ validation.ts # Input validation
β βββ sanitize.ts # XSS protection
β βββ format.ts # Data formatting
β βββ admin.ts # Admin utilities
β βββ cn.ts # Tailwind className merger
β
βββ π types/
β βββ database.ts # TypeScript types + interfaces
β
βββ π public/ # Static assets
β βββ logo.png # Brand logo
β
βββ π scripts/ # Utility scripts
β βββ verify-schema.ts # Schema verification
β
βββ π Configuration Files
βββ next.config.js # Next.js config + security headers
βββ tailwind.config.js # Tailwind CSS config
βββ tsconfig.json # TypeScript config
βββ postcss.config.js # PostCSS plugins
βββ package.json # Dependencies + scripts
βββ .env.local # Environment variables (create this)
- Primary: Deep blue for CTAs and accents
- Secondary: Muted gray for secondary actions
- Muted: Light backgrounds and borders
- Accent: Highlight colors for interactive elements
- Destructive: Error and warning states
- Font: System font stack for optimal performance
- Sizes: Responsive scaling from mobile to desktop
- Weights: Regular (400) and Semibold (600)
All components follow a consistent API pattern with:
- Variants: Multiple visual styles
- Sizes: Small, medium, large
- States: Default, hover, active, disabled
- Accessibility: ARIA labels, keyboard navigation
Premium animations powered by Framer Motion:
- Smooth fade-in/out on route changes
- Staggered content reveal
- Loading skeleton with shimmer effect
- Buttons: Scale feedback on hover/tap
- Cards: Lift effect on hover with smooth shadow transition
- Badges: Pop-in animation with exit transitions
- Filters: Expand/collapse with height animation
- Hero Parallax: Mouse-tracking background movement
- Icon Animations: Rotate and float effects
- Search Modal: Scale and fade entrance
- Sparkles: Continuous pulse and wiggle
All animations respect prefers-reduced-motion for accessibility.
π See ANIMATIONS.md for complete documentation
- Row Level Security (RLS) enabled on all tables
- Authenticated access for full content
- Sneak peek policy for limited preview
- Secure by default with explicit policies
- Input Sanitization: XSS protection on all user inputs
- Security Headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options
- Environment Variables: No hardcoded credentials
- HTTPS Only: Enforced in production
- Rate Limiting: Recommended for API routes
- Supabase Auth: Industry-standard authentication
- Secure Cookies: HttpOnly, Secure, SameSite
- Session Management: Automatic refresh and expiry
- Protected Routes: Server-side auth checks
| Column | Type | Description | Indexed |
|---|---|---|---|
id |
UUID | Primary key | β |
title |
TEXT | Resource title | β |
url |
TEXT | Resource link | - |
author |
TEXT | Author name(s) | - |
source |
TEXT | Source/publication | - |
topics |
TEXT[] | Array of topics | β (GIN) |
tag_categories |
TEXT[] | Category tags | β (GIN) |
tag_subcategories |
TEXT[] | Subcategory tags | β (GIN) |
difficulty |
TEXT | Difficulty level | β |
content_type |
TEXT | Type of content | β |
rating |
NUMERIC(3,2) | Rating (0-5) | β |
key_takeaways |
TEXT[] | Key points | - |
date_added |
TIMESTAMPTZ | When added | β |
publisher |
TEXT | Publisher name | - |
created_at |
TIMESTAMPTZ | Record creation | - |
updated_at |
TIMESTAMPTZ | Last update | - |
-
Push to GitHub
git push origin main
-
Import to Vercel
- Visit vercel.com
- Click "New Project"
- Import your GitHub repository
-
Configure Environment Variables
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
-
Deploy π
- Automatic deployments on every push
- Preview deployments for pull requests
- Production deployment on main branch
Netlify
npm run buildDeploy the .next folder
AWS Amplify
- Build command:
npm run build - Output directory:
.next
Self-Hosted
npm run build
npm startUse the /api/verify endpoint to verify:
- β Supabase connection
- β Table existence
- β RLS policies
- β Data retrieval
| Endpoint | Method | Description |
|---|---|---|
/api/resources |
GET | Fetch resources (authenticated) |
/api/sneak-peek |
GET | Preview content (public) |
/api/resource-options |
GET | Filter options |
/api/verify |
GET | Database verification |
/api/revalidate |
POST | Cache invalidation |
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL | β |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key | β |
Key features enabled in next.config.js:
- Security Headers: CSP, HSTS, frame protection
- Image Optimization: Automatic WebP conversion
- Compression: Gzip enabled
- Environment: Type-checked variables
- QUICK_START.md - Fast setup for existing databases
- SCHEMA_MAPPING.md - Custom schema mapping guide
- ANIMATIONS.md - Complete animation documentation
- MVP_SUMMARY.md - MVP feature summary
- PROJECT_PLAN.md - Development roadmap
- ADMIN_PANEL.md - Admin features guide
β No data showing (0 resources)
- Cause: RLS policies blocking access
- Fix: Run the RLS policy SQL from setup section
- Verify: Check
/api/verifyendpoint
β Authentication not working
- Cause: Incorrect Supabase URL/keys
- Fix: Verify
.env.localvalues - Test: Check browser console for errors
β Filters not populating
- Cause: Empty arrays or incorrect data types
- Fix: Ensure topics/tags are TEXT[] arrays
- Verify: Query data directly in Supabase
β Slow performance
- Cause: Missing database indexes
- Fix: Run index creation SQL
- Monitor: Use Supabase performance insights
β Build errors
- Cause: TypeScript errors or missing dependencies
- Fix:
npm installand check types - Clean: Delete
.nextfolder and rebuild
π Full troubleshooting guide: Check console logs and Supabase dashboard
- Bookmarking System: Save favorite resources
- User Profiles: Personalized recommendations
- Resource Ratings: User-submitted ratings
- Comments & Discussions: Community engagement
- Export Functionality: CSV/JSON export
- Advanced Analytics: Usage tracking
- Mobile App: React Native version
- AI Recommendations: ML-powered suggestions
- Social Sharing: Share resources easily
- Offline Support: PWA capabilities
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure TypeScript types are correct
This project is licensed under the MIT License - see the LICENSE file for details.
Mahaprasad
- GitHub: @Mahaprasad003
- Project: DPC-Recommends
- Next.js team for the amazing framework
- Supabase for the backend infrastructure
- Vercel for seamless deployment
- Framer Motion for beautiful animations
- Tailwind CSS for the utility-first approach
- Open Source Community for inspiration and tools
Built with β€οΈ using Next.js, TypeScript, and Supabase
β Star this repo if you find it helpful!