Skip to content

TintinSDev/TechDive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Techdive πŸš€

Techdive is a modern remote tech jobs discovery and matching platform that connects developers worldwide with high-quality remote opportunities. Find your next remote role, track applications, and manage subscriptions all in one place.

Live: techdive.space


Features ✨

For Job Seekers

  • πŸ” Browse Jobs - Aggregate remote jobs from Remotive, Arbeitnow, and more
  • 🎯 Smart Filtering - Filter by category, experience, job type, salary range
  • πŸ’Ύ Save Jobs - Bookmark interesting opportunities for later
  • πŸ“Š Track Applications - Monitor application status (applied, interviewing, accepted, rejected)
  • πŸ€– AI Recommendations - Get personalized job matches based on your skills
  • πŸ“§ Email Alerts - Daily/weekly job digests tailored to your preferences
  • πŸ’³ Flexible Subscriptions - Free, Pro ($9.99/month), or Enterprise plans

For the Platform

  • 🌍 Multi-currency Support - KES, USD with Paystack/Stripe integration
  • πŸ” Secure Authentication - JWT tokens, cookie-based sessions
  • πŸ“ˆ Real-time Analytics - Vercel Analytics tracking user engagement
  • 🎨 Dark Theme UI - Modern, accessible design with Tailwind CSS
  • πŸ“± Fully Responsive - Works seamlessly on mobile and desktop

Tech Stack πŸ› οΈ

Frontend

  • Framework: Next.js 16 with App Router
  • Styling: Tailwind CSS
  • State Management: Zustand
  • Hosting: Vercel
  • UI Components: Custom + Lucide icons
  • Type Safety: TypeScript

Backend

  • Runtime: Node.js
  • Framework: Express 5
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT + HTTP-only cookies
  • Hosting: Railway
  • Job Scheduling: Node.js intervals (every 6 hours)
  • Payment: Paystack API integration

DevOps & Tools

  • Database Hosting: Neon PostgreSQL
  • Email: Resend (planned)
  • Analytics: Vercel Analytics
  • Version Control: Git/GitHub
  • Monitoring: Railway logs

Project Structure πŸ“

techdive/
β”œβ”€β”€ frontend/                    # Next.js application
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (public)/           # Public pages (landing, auth, etc)
β”‚   β”‚   β”œβ”€β”€ (dashboard)/        # Protected dashboard routes
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable React components
β”‚   β”‚   β”œβ”€β”€ lib/               # Utilities, hooks, API client
β”‚   β”‚   └── layout.tsx
β”‚   β”œβ”€β”€ public/                 # Static assets
β”‚   └── package.json
β”‚
└── backend/                     # Express API
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ controllers/        # Request handlers
    β”‚   β”œβ”€β”€ routes/            # API route definitions
    β”‚   β”œβ”€β”€ middleware/        # Auth, error handling, rate limiting
    β”‚   β”œβ”€β”€ services/          # Business logic (payments, scraping)
    β”‚   β”œβ”€β”€ lib/              # Database, utilities
    β”‚   └── index.js          # Entry point
    β”œβ”€β”€ prisma/               # Database schema & migrations
    └── package.json

Getting Started πŸš€

Prerequisites

  • Node.js 22+
  • npm or yarn
  • PostgreSQL database
  • Paystack account (for payments)

Local Setup

1. Clone & Install

# Clone repository
git clone https://github.com/tintin-dev/techdive.git
cd techdive

# Frontend setup
cd frontend
npm install

# Backend setup (in new terminal)
cd ../backend
npm install

2. Environment Variables

Backend: backend/.env

# Database
DATABASE_URL=postgresql://*******

# JWT
JWT_SECRET=your_super_secret_key_here
JWT_EXPIRE=24h

# Paystack
PAYSTACK_SECRET_KEY=sk_test_xxxxx
PAYSTACK_PLAN_PRO=PLN_xxxxx
PAYSTACK_PLAN_ENTERPRISE=PLN_xxxxx

# Frontend
FRONTEND_URL=http://localhost:3000

# Admin
ADMIN_API_KEY=secret_admin_key

# Optional
AFRICA_TALKING_API_KEY=xxxxx

Frontend: frontend/.env.local

NEXT_PUBLIC_API_URL=http://localhost:5000/api

3. Database Setup

cd backend

# Create database
npx prisma migrate dev --name init

# Seed data (optional)
npx prisma db seed

4. Run Locally

# Terminal 1: Backend (port 5000)
cd backend
npm run dev

# Terminal 2: Frontend (port 3000)
cd frontend
npm run dev

Visit http://localhost:3000 πŸŽ‰


API Endpoints πŸ“‘

Authentication

  • POST /api/auth/signup - Create account
  • POST /api/auth/login - Login
  • GET /api/auth/me - Get current user

Jobs

  • GET /api/jobs - List jobs with filters
  • GET /api/jobs/:id - Get job details
  • POST /api/jobs/save - Save job
  • POST /api/jobs/unsave - Unsave job
  • GET /api/jobs/saved - Get saved jobs

Applications

  • GET /api/applications - List user applications
  • POST /api/applications - Apply for job
  • PATCH /api/applications/:id - Update application status

Subscriptions

  • GET /api/subscriptions - Get subscription status
  • POST /api/subscriptions/paystack/checkout - Initiate Paystack payment
  • POST /api/subscriptions/payments/verify/:reference - Verify payment
  • POST /api/subscriptions/cancel - Cancel subscription

Recommendations

  • GET /api/recommendations - Get personalized jobs
  • GET /api/recommendations/trending - Trending jobs this week
  • GET /api/recommendations/similar/:jobId - Similar jobs

Users

  • PATCH /api/users/profile - Update profile
  • GET /api/users/preferences - Get email preferences
  • PATCH /api/users/preferences - Update preferences
  • DELETE /api/users/delete - Delete account

Database Schema πŸ—„οΈ

Core Models

  • User - User accounts, profiles, preferences
  • Subscription - Subscription plans and billing
  • Job - Job listings with details
  • SavedJob - Bookmarked jobs
  • JobApplication - Application tracking
  • Invoice - Payment history
  • JobScrapeLog - Scraper run logs

See prisma/schema.prisma for full schema.


Deployment 🌐

Backend (Railway)

# Login to Railway
railway login

# Link project
railway link

# Deploy
railway up

# View logs
railway logs

Set environment variables in Railway dashboard.

Frontend (Vercel)

# Push to GitHub (auto-deploys)
git push origin main

# Or manual deploy
vercel deploy --prod

Important: Set NEXT_PUBLIC_API_URL in Vercel Environment Variables!

NEXT_PUBLIC_API_URL=https://your-railway-backend.up.railway.app/api

Job Scraping πŸ€–

Jobs are automatically scraped every 6 hours from:

Scraper runs on backend startup and scheduled intervals.

To manually trigger:

curl -X GET http://localhost:5000/api/admin/scrape \
  -H "Authorization: Bearer $ADMIN_API_KEY"

Payment Integration πŸ’³

Paystack Setup

  1. Create Account - https://paystack.com
  2. Create Plans
    • Pro: 1899 KES
    • Enterprise: 3999 KES
  3. Get Credentials
    • Secret Key
    • Plan Codes (PLN_xxx)
  4. Set Webhook URL (Production)
    https://your-backend.up.railway.app/api/webhooks/paystack
    

Test Payments

Use Paystack test mode cards:

  • Visa: 4111 1111 1111 1111
  • Mastercard: 5399 8181 8181 8181
  • Any expiry/CVV in test mode

Email & Notifications πŸ“§

  • Resend - Email delivery
  • Job alerts - Daily/weekly digests
  • Application updates - Status changes
  • Newsletter - Platform tips & updates

Features Roadmap πŸ—ΊοΈ

  • Google/GitHub OAuth
  • Resume upload & matching
  • Interview scheduling
  • Employer dashboard
  • Sponsored job listings
  • API access (Enterprise)
  • Teams collaboration
  • Mobile app (React Native)

Key Pages πŸ“„

Public

  • / - Landing page with pricing
  • /jobs - Browse all jobs
  • /jobs/[id] - Job details
  • /signup - Create account
  • /login - Sign in
  • /blog - Blog posts
  • /faq - FAQs
  • /contact - Contact form
  • /privacy - Privacy policy
  • /terms - Terms of service
  • /cookies - Cookie policy

Dashboard (Protected)

  • /dashboard - Home with stats
  • /dashboard/jobs - Job browser
  • /dashboard/applications - Application tracker
  • /dashboard/saved - Saved jobs
  • /dashboard/pricing - Upgrade plan
  • /dashboard/profile - Edit profile
  • /dashboard/settings - Account settings

Environment Variables Reference πŸ”‘

Variable Required Description
DATABASE_URL βœ… PostgreSQL connection string
JWT_SECRET βœ… JWT signing key
PAYSTACK_SECRET_KEY βœ… Paystack API key
PAYSTACK_PLAN_PRO βœ… Paystack Pro plan code
PAYSTACK_PLAN_ENTERPRISE βœ… Paystack Enterprise plan code
FRONTEND_URL βœ… Frontend base URL
ADMIN_API_KEY βœ… Admin endpoint auth
NEXT_PUBLIC_API_URL βœ… API base URL (frontend only)
JWT_EXPIRE ❌ Token expiry (default: 24h)
PORT ❌ Backend port (default: 5000)

Testing πŸ§ͺ

Manual Testing

  1. Sign up with email
  2. Browse jobs on /jobs
  3. Click job to view details
  4. Save a job
  5. Go to dashboard
  6. View saved jobs
  7. Test subscription upgrade
  8. Track application status

Automated Testing

# Run tests (coming soon)
npm test

Performance πŸš€

Metrics

  • Lighthouse Score: 76+ (Speed, SEO, Best Practices)
  • LCP (Largest Contentful Paint): < 2.5s
  • CLS (Cumulative Layout Shift): < 0.1
  • TTL (Time to First Byte): < 1s

Optimization

  • Image optimization (WebP, AVIF)
  • Code splitting & lazy loading
  • Database query optimization
  • Redis caching (planned)

Troubleshooting πŸ”§

Jobs Not Displaying

  1. Check scraper logs: npm run dev in backend
  2. Verify database connection: npx prisma studio
  3. Manually trigger scrape (see Job Scraping section)

Payment Not Updating

  1. Check webhook URL on Paystack dashboard
  2. Verify PAYSTACK_SECRET_KEY is correct
  3. Check Railway logs for webhook errors
  4. Use ngrok for local testing: ngrok http 5000

404 on Job Details

  1. Ensure NEXT_PUBLIC_API_URL is set on Vercel
  2. Backend job endpoint exists: GET /api/jobs/:id
  3. Redeploy frontend after env var change

Auth Issues

  1. Check cookie in DevTools (Application β†’ Cookies)
  2. Verify JWT secret is same on frontend and backend
  3. Check token expiry: JWT_EXPIRE

Contributing 🀝

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

License πŸ“œ

This project is licensed under the MIT License - see LICENSE file for details.


Support πŸ’¬


Built By ✍️

Martin - Full-stack developer in Nairobi, Kenya


Acknowledgments πŸ™

  • Job Sources: Remotive, Arbeitnow
  • Hosting: Vercel, Railway, Neon
  • Payments: Paystack
  • Icons: Lucide React
  • Design: Tailwind CSS

Last Updated

May 30, 2026

Status: Live & Production Ready


Happy coding! πŸš€

About

Job listings platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages