├── app ├── favicon.ico ├── robots.ts ├── not-found.tsx ├── page.tsx ├── jobs │ ├── not-found.tsx │ ├── language │ │ └── [language] │ │ │ └── page.tsx │ ├── type │ │ └── [type] │ │ │ └── page.tsx │ ├── level │ │ └── [level] │ │ │ └── page.tsx │ ├── location │ │ └── [location] │ │ │ └── page.tsx │ └── types │ │ └── page.tsx ├── feed.xml │ └── route.ts ├── atom.xml │ └── route.ts ├── feed.json │ └── route.ts ├── api │ ├── og │ │ ├── route.tsx │ │ └── jobs │ │ │ └── [slug] │ │ │ └── route.tsx │ └── subscribe │ │ └── route.ts ├── changelog │ └── page.tsx ├── globals.css ├── faq │ └── page.tsx ├── job-alerts │ └── page.tsx └── sitemap.ts ├── public ├── office.jpg ├── screenshot.png ├── assets │ ├── bordful.png │ ├── social │ │ ├── rss.svg │ │ ├── linkedin.svg │ │ ├── bluesky.svg │ │ ├── github.svg │ │ ├── twitter.svg │ │ └── reddit.svg │ ├── mastercard.svg │ ├── applepay.svg │ ├── visa.svg │ ├── amex.svg │ ├── googlepay.svg │ └── paypal.svg ├── avatars │ ├── marketful.png │ ├── uithings.png │ └── bestwriting.png ├── bordful-localhost.jpg ├── download-nodejs.jpg ├── hero-background.jpg ├── airtable-add-new-job.jpg ├── copy-airtable-base-id.jpg ├── check-node-and-npm-versions.jpg ├── bordful-job-board-software-demo.jpg ├── vercel.svg ├── use-cursor-to-customize-your-job-board-using-natural-language.jpg ├── window.svg ├── file.svg ├── globe.svg ├── next.svg └── bordful.svg ├── .cursor └── rules │ ├── lib-utilities.mdc │ ├── project-overview.mdc │ ├── components-architecture.mdc │ ├── configuration-system.mdc │ ├── development-workflow.mdc │ ├── autofix.mdc │ └── app-router-structure.mdc ├── lib ├── utils.ts ├── email │ ├── index.ts │ ├── types.ts │ └── providers │ │ └── encharge.ts ├── hooks │ ├── useJobsPerPage.ts │ ├── usePagination.ts │ ├── useSortOrder.ts │ └── useJobSearch.ts ├── utils │ ├── filter-jobs.ts │ ├── slugify.ts │ ├── image-utils.ts │ ├── formatDate.ts │ ├── job-validation.ts │ ├── fonts.ts │ ├── rss.ts │ ├── font-utils.ts │ └── metadata.ts ├── constants │ ├── job-types.ts │ ├── career-levels.ts │ ├── workplace.ts │ ├── defaults.ts │ └── locations.ts └── config │ └── routes.ts ├── postcss.config.mjs ├── biome.jsonc ├── .env.example ├── components ├── jobs │ ├── JobCardList.tsx │ ├── CompactJobCardList.tsx │ ├── JobListings.tsx │ ├── JobSearch.tsx │ ├── CompactJobCard.tsx │ └── JobCard.tsx ├── ui │ ├── label.tsx │ ├── toaster.tsx │ ├── input.tsx │ ├── client-breadcrumb.tsx │ ├── collapsible-text.tsx │ ├── checkbox.tsx │ ├── switch.tsx │ ├── badge.tsx │ ├── about-schema.tsx │ ├── avatar.tsx │ ├── contact-schema.tsx │ ├── metadata-breadcrumb.tsx │ ├── card.tsx │ ├── accordion.tsx │ ├── button.tsx │ ├── post-job-banner.tsx │ ├── icons.tsx │ ├── jobs-per-page-select.tsx │ ├── sort-order-select.tsx │ ├── job-badge.tsx │ ├── job-search-input.tsx │ ├── similar-jobs.tsx │ └── pagination.tsx └── contact │ ├── ContactInfoSection.tsx │ └── SupportChannelCard.tsx ├── .gitignore ├── components.json ├── SECURITY.md ├── tsconfig.json ├── config ├── index.ts └── README.md ├── .vscode └── settings.json ├── LICENSE ├── docs ├── _template.md ├── guides │ └── index.md ├── integrations │ └── index.md ├── advanced │ └── index.md ├── troubleshooting │ └── index.md ├── reference │ └── index.md └── getting-started │ └── index.md ├── tailwind.config.ts ├── CONTRIBUTING.md ├── package.json └── next.config.ts /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /public/office.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/office.jpg -------------------------------------------------------------------------------- /.cursor/rules/lib-utilities.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | -------------------------------------------------------------------------------- /public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/screenshot.png -------------------------------------------------------------------------------- /.cursor/rules/project-overview.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | -------------------------------------------------------------------------------- /public/assets/bordful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/assets/bordful.png -------------------------------------------------------------------------------- /.cursor/rules/components-architecture.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | -------------------------------------------------------------------------------- /.cursor/rules/configuration-system.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | -------------------------------------------------------------------------------- /.cursor/rules/development-workflow.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | -------------------------------------------------------------------------------- /public/avatars/marketful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/avatars/marketful.png -------------------------------------------------------------------------------- /public/avatars/uithings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/avatars/uithings.png -------------------------------------------------------------------------------- /public/bordful-localhost.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/bordful-localhost.jpg -------------------------------------------------------------------------------- /public/download-nodejs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/download-nodejs.jpg -------------------------------------------------------------------------------- /public/hero-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/hero-background.jpg -------------------------------------------------------------------------------- /public/avatars/bestwriting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/avatars/bestwriting.png -------------------------------------------------------------------------------- /public/airtable-add-new-job.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/airtable-add-new-job.jpg -------------------------------------------------------------------------------- /public/copy-airtable-base-id.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/copy-airtable-base-id.jpg -------------------------------------------------------------------------------- /public/check-node-and-npm-versions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/check-node-and-npm-versions.jpg -------------------------------------------------------------------------------- /public/bordful-job-board-software-demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/bordful-job-board-software-demo.jpg -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/use-cursor-to-customize-your-job-board-using-natural-language.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftled/bordful/HEAD/public/use-cursor-to-customize-your-job-board-using-natural-language.jpg -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from 'clsx'; 2 | import { twMerge } from 'tailwind-merge'; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | autoprefixer: {}, 6 | }, 7 | }; 8 | 9 | export default config; 10 | -------------------------------------------------------------------------------- /biome.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/2.2.2/schema.json", 3 | "extends": ["ultracite"], 4 | "linter": { 5 | "rules": { 6 | "suspicious": { 7 | "noUnknownAtRules": "off" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/email/index.ts: -------------------------------------------------------------------------------- 1 | import { EnchargeProvider } from './providers/encharge'; 2 | 3 | // Export a pre-configured instance of the Encharge provider 4 | export const emailProvider = new EnchargeProvider(); 5 | 6 | // Export types for convenience 7 | export * from './types'; 8 | -------------------------------------------------------------------------------- /public/assets/social/rss.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | AIRTABLE_ACCESS_TOKEN= 2 | AIRTABLE_BASE_ID= 3 | AIRTABLE_TABLE_NAME=Jobs 4 | 5 | # Email Provider Configuration 6 | # Choose your email provider: encharge, mailchimp, convertkit, sendgrid 7 | EMAIL_PROVIDER=encharge 8 | 9 | # Encharge Configuration 10 | ENCHARGE_WRITE_KEY=your_encharge_write_key_here 11 | 12 | # Application URL 13 | NEXT_PUBLIC_APP_URL=https://yourdomain.com -------------------------------------------------------------------------------- /public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/jobs/JobCardList.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { JobCard } from '@/components/jobs/JobCard'; 4 | import type { Job } from '@/lib/db/airtable'; 5 | 6 | export function JobCardList({ jobs }: { jobs: Job[] }) { 7 | return ( 8 |
9 | {jobs.map((job) => ( 10 | 11 | ))} 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /.cursor/rules/autofix.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: 3 | globs: 4 | alwaysApply: false 5 | --- 6 | Please use the Playwright MCP to open a browser to the URL I provide, check for any errors, and then automatically fix those errors in my codebase, then continue to iterate until all the errors are gone. 7 | 8 | Always check if there are any red buttons or other openable boxes that should pop open a dialog, which will reveal more errors for you to fix. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # lockfiles 7 | package-lock.json 8 | yarn.lock 9 | pnpm-lock.yaml 10 | bun.lockb 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | 23 | # env files 24 | .env* 25 | !.env.example 26 | 27 | # vercel 28 | .vercel 29 | 30 | # typescript 31 | *.tsbuildinfo 32 | next-env.d.ts -------------------------------------------------------------------------------- /public/assets/social/linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /public/assets/social/bluesky.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/hooks/useJobsPerPage.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { parseAsInteger, useQueryState } from 'nuqs'; 4 | import { DEFAULT_PER_PAGE } from '@/lib/constants/defaults'; 5 | 6 | export function useJobsPerPage() { 7 | const [jobsPerPage, setJobsPerPage] = useQueryState( 8 | 'per_page', 9 | parseAsInteger.withDefault(DEFAULT_PER_PAGE) 10 | ); 11 | 12 | return { 13 | jobsPerPage, 14 | setJobsPerPage: (value: number) => { 15 | // If value is the default, remove the parameter from URL 16 | setJobsPerPage(value === DEFAULT_PER_PAGE ? null : value); 17 | }, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lib/utils/filter-jobs.ts: -------------------------------------------------------------------------------- 1 | import type { Job } from '@/lib/db/airtable'; 2 | 3 | export function filterJobsBySearch(jobs: Job[], searchTerm: string): Job[] { 4 | if (!searchTerm) { 5 | return jobs; 6 | } 7 | 8 | const searchLower = searchTerm.toLowerCase(); 9 | 10 | return jobs.filter( 11 | (job) => 12 | job.title.toLowerCase().includes(searchLower) || 13 | job.company.toLowerCase().includes(searchLower) || 14 | (job.workplace_city?.toLowerCase() || '').includes(searchLower) || 15 | (job.workplace_country?.toLowerCase() || '').includes(searchLower) 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /app/robots.ts: -------------------------------------------------------------------------------- 1 | import type { MetadataRoute } from 'next'; 2 | import config from '@/config'; 3 | 4 | export default function robots(): MetadataRoute.Robots { 5 | // Use the URL from config 6 | const baseUrl = config.url; 7 | 8 | return { 9 | rules: { 10 | userAgent: '*', 11 | // Allow root path and /api/og/* paths for Open Graph images 12 | allow: ['/', '/api/og/*'], 13 | // Disallow any potential admin or private routes 14 | disallow: ['/api/subscribe/*', '/api/encharge-logs/*'], 15 | }, 16 | sitemap: `${baseUrl}/sitemap.xml`, 17 | host: baseUrl, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /components/jobs/CompactJobCardList.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { CompactJobCard } from '@/components/jobs/CompactJobCard'; 4 | import type { Job } from '@/lib/db/airtable'; 5 | 6 | export function CompactJobCardList({ 7 | jobs, 8 | className = '', 9 | }: { 10 | jobs: Job[]; 11 | className?: string; 12 | }) { 13 | return ( 14 |
15 | {jobs.map((job, index) => ( 16 |
17 | 18 |
19 | ))} 20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /lib/constants/job-types.ts: -------------------------------------------------------------------------------- 1 | import type { Job } from '@/lib/db/airtable'; 2 | 3 | export type JobType = Job['type']; 4 | 5 | export const JOB_TYPE_DISPLAY_NAMES: Record = { 6 | 'Full-time': 'Full-time', 7 | 'Part-time': 'Part-time', 8 | Contract: 'Contract', 9 | Freelance: 'Freelance', 10 | } as const; 11 | 12 | export const JOB_TYPE_DESCRIPTIONS: Record = { 13 | 'Full-time': 'Permanent positions with standard working hours', 14 | 'Part-time': 'Positions with reduced or flexible hours', 15 | Contract: 'Fixed-term or project-based positions', 16 | Freelance: 'Self-employed or project-based contractual work', 17 | } as const; 18 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as LabelPrimitive from '@radix-ui/react-label'; 2 | import * as React from 'react'; 3 | import { cn } from '@/lib/utils'; 4 | 5 | const Label = React.forwardRef< 6 | React.ElementRef, 7 | React.ComponentPropsWithoutRef 8 | >(({ className, ...props }, ref) => ( 9 | 17 | )); 18 | Label.displayName = LabelPrimitive.Root.displayName; 19 | 20 | export { Label }; 21 | -------------------------------------------------------------------------------- /lib/constants/career-levels.ts: -------------------------------------------------------------------------------- 1 | import type { CareerLevel } from '@/lib/db/airtable'; 2 | 3 | export const CAREER_LEVEL_DISPLAY_NAMES: Record = { 4 | Internship: 'Internship', 5 | EntryLevel: 'Entry Level', 6 | Associate: 'Associate', 7 | Junior: 'Junior', 8 | MidLevel: 'Mid Level', 9 | Senior: 'Senior', 10 | Staff: 'Staff', 11 | Principal: 'Principal', 12 | Lead: 'Lead', 13 | Manager: 'Manager', 14 | SeniorManager: 'Senior Manager', 15 | Director: 'Director', 16 | SeniorDirector: 'Senior Director', 17 | VP: 'VP', 18 | SVP: 'SVP', 19 | EVP: 'EVP', 20 | CLevel: 'C-Level', 21 | Founder: 'Founder', 22 | NotSpecified: 'Not Specified', 23 | } as const; 24 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 1.0.x | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | If you discover a security vulnerability, please follow these steps: 12 | 13 | 1. **Do Not** open a public issue 14 | 2. Email security details to support@bordful.com 15 | 3. Include: 16 | - Description of the vulnerability 17 | - Steps to reproduce 18 | - Potential impact 19 | - Suggested fix (if any) 20 | 21 | We will: 22 | - Acknowledge receipt within 48 hours 23 | - Provide an estimated timeline for a fix 24 | - Keep you updated on the progress 25 | 26 | Thank you for helping keep Bordful secure! -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | }, 24 | "strictNullChecks": true 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules"] 28 | } 29 | -------------------------------------------------------------------------------- /app/not-found.tsx: -------------------------------------------------------------------------------- 1 | import { Home } from 'lucide-react'; 2 | import Link from 'next/link'; 3 | import { Button } from '@/components/ui/button'; 4 | 5 | export default function NotFound() { 6 | return ( 7 |
8 |

404

9 |

Page Not Found

10 |

11 | Sorry, we couldn't find the page you're looking for. 12 |

13 | 14 | 18 | 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /components/jobs/JobListings.tsx: -------------------------------------------------------------------------------- 1 | import { JobCard } from '@/components/jobs/JobCard'; 2 | import type { Job } from '@/lib/db/airtable'; 3 | 4 | type JobListingsProps = { 5 | jobs: Job[]; 6 | showFiltered?: boolean; 7 | }; 8 | 9 | export function JobListings({ jobs, showFiltered = true }: JobListingsProps) { 10 | return ( 11 |
12 | {showFiltered && ( 13 |

14 | Showing {jobs.length.toLocaleString()}{' '} 15 | {jobs.length === 1 ? 'position' : 'positions'} 16 |

17 | )} 18 |
19 | {jobs.map((job) => ( 20 | 21 | ))} 22 |
23 |
24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /lib/hooks/usePagination.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { parseAsInteger, useQueryState } from 'nuqs'; 4 | import config from '@/config'; 5 | import { DEFAULT_PER_PAGE } from '@/lib/constants/defaults'; 6 | 7 | export function usePagination() { 8 | // Get default per page from config or fallback 9 | const defaultPerPage = config.jobListings?.defaultPerPage || DEFAULT_PER_PAGE; 10 | 11 | const [page, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); 12 | 13 | const [perPage, setPerPage] = useQueryState( 14 | 'per_page', 15 | parseAsInteger.withDefault(defaultPerPage) 16 | ); 17 | 18 | // Ensure page is at least 1 19 | const validPage = Math.max(1, page); 20 | 21 | return { 22 | page: validPage, 23 | setPage, 24 | perPage, 25 | setPerPage, 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /public/assets/social/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/email/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Basic subscriber data structure 3 | */ 4 | export type SubscriberData = { 5 | email: string; 6 | name?: string; 7 | ip?: string; 8 | metadata?: Record; // More specific type for metadata 9 | }; 10 | 11 | /** 12 | * Common interface for all email providers 13 | */ 14 | export type EmailProvider = { 15 | name: string; 16 | subscribe(data: SubscriberData): Promise<{ 17 | success: boolean; 18 | error?: string; 19 | }>; 20 | }; 21 | 22 | /** 23 | * Custom error class for email provider errors 24 | */ 25 | export class EmailProviderError extends Error { 26 | constructor( 27 | message: string, 28 | public provider: string 29 | ) { 30 | super(message); 31 | this.name = 'EmailProviderError'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/assets/social/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /components/ui/toaster.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { 4 | Toast, 5 | ToastClose, 6 | ToastDescription, 7 | ToastProvider, 8 | ToastTitle, 9 | ToastViewport, 10 | } from '@/components/ui/toast'; 11 | import { useToast } from '@/hooks/use-toast'; 12 | 13 | export function Toaster() { 14 | const { toasts } = useToast(); 15 | 16 | return ( 17 | 18 | {toasts.map(({ id, title, description, action, ...props }) => ( 19 | 20 |
21 | {title && {title}} 22 | {description && {description}} 23 |
24 | {action} 25 | 26 |
27 | ))} 28 | 29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/lib/utils'; 4 | 5 | const Input = React.forwardRef>( 6 | ({ className, type, ...props }, ref) => { 7 | return ( 8 | 17 | ); 18 | } 19 | ); 20 | Input.displayName = 'Input'; 21 | 22 | export { Input }; 23 | -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next'; 2 | import { HomePage } from '@/components/home/HomePage'; 3 | import config from '@/config'; 4 | import { getJobs } from '@/lib/db/airtable'; 5 | import { generateMetadata } from '@/lib/utils/metadata'; 6 | 7 | // Add metadata for SEO 8 | export const metadata: Metadata = generateMetadata({ 9 | title: config.title, 10 | description: config.description, 11 | path: '/', 12 | openGraph: { 13 | type: 'website', 14 | images: [ 15 | { 16 | url: '/api/og', 17 | width: 1200, 18 | height: 630, 19 | alt: `${config.title} - ${config.description}`, 20 | }, 21 | ], 22 | }, 23 | }); 24 | 25 | // Revalidate every 5 minutes 26 | export const revalidate = 300; 27 | 28 | export default async function Home() { 29 | const jobs = await getJobs(); 30 | return ; 31 | } 32 | -------------------------------------------------------------------------------- /config/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Configuration Loader 3 | * ------------------ 4 | * This module exports the configuration for the job board. 5 | * 6 | * Quick Start: 7 | * 1. Copy config.example.ts to config.ts 8 | * 2. Customize config.ts with your settings 9 | * 3. The app will use your custom configuration 10 | */ 11 | 12 | import type { Config } from './config.example'; 13 | import { config as exampleConfig } from './config.example'; 14 | 15 | let customConfig: Partial | undefined; 16 | 17 | // Try to load custom config if it exists 18 | try { 19 | customConfig = require('./config').config; 20 | } catch { 21 | // No custom config found, will use example config 22 | } 23 | 24 | // Create the final config object, merging custom config if it exists 25 | const config: Config = { 26 | ...exampleConfig, 27 | ...(customConfig || {}), 28 | }; 29 | 30 | export type { Config }; 31 | export default config; 32 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[javascript]": { 3 | "editor.defaultFormatter": "biomejs.biome" 4 | }, 5 | "[typescript]": { 6 | "editor.defaultFormatter": "biomejs.biome" 7 | }, 8 | "[javascriptreact]": { 9 | "editor.defaultFormatter": "biomejs.biome" 10 | }, 11 | "[typescriptreact]": { 12 | "editor.defaultFormatter": "biomejs.biome" 13 | }, 14 | "[json]": { 15 | "editor.defaultFormatter": "biomejs.biome" 16 | }, 17 | "[jsonc]": { 18 | "editor.defaultFormatter": "biomejs.biome" 19 | }, 20 | "[css]": { 21 | "editor.defaultFormatter": "biomejs.biome" 22 | }, 23 | "[graphql]": { 24 | "editor.defaultFormatter": "biomejs.biome" 25 | }, 26 | "typescript.tsdk": "node_modules/typescript/lib", 27 | "editor.formatOnSave": true, 28 | "editor.formatOnPaste": true, 29 | "emmet.showExpandedAbbreviation": "never", 30 | "editor.codeActionsOnSave": { 31 | "source.fixAll.biome": "explicit", 32 | "source.organizeImports.biome": "explicit" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/globe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/ui/client-breadcrumb.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { usePathname } from 'next/navigation'; 4 | import { PageBreadcrumb } from './server-breadcrumb'; 5 | 6 | type ClientBreadcrumbProps = { 7 | /** 8 | * Optional dynamic data to override the automatically generated breadcrumb 9 | * Useful for job detail pages where the title comes from the job data 10 | */ 11 | dynamicData?: { 12 | name: string; 13 | url: string; 14 | }; 15 | 16 | /** 17 | * Optional className to apply to the breadcrumb container 18 | */ 19 | className?: string; 20 | }; 21 | 22 | /** 23 | * Client-side breadcrumb wrapper that gets the current pathname 24 | * and passes it to the server-side breadcrumb component 25 | */ 26 | export function ClientBreadcrumb({ 27 | dynamicData, 28 | className, 29 | }: ClientBreadcrumbProps) { 30 | const pathname = usePathname(); 31 | 32 | return ( 33 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /components/ui/collapsible-text.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useState } from 'react'; 4 | 5 | type CollapsibleTextProps = { 6 | text: string; 7 | maxLength: number; 8 | }; 9 | 10 | export function CollapsibleText({ text, maxLength }: CollapsibleTextProps) { 11 | const [isExpanded, setIsExpanded] = useState(false); 12 | 13 | // If text is shorter than maxLength, just return it 14 | if (text.length <= maxLength) { 15 | return

{text}

; 16 | } 17 | 18 | const displayText = isExpanded 19 | ? text 20 | : `${text.substring(0, maxLength).trim()}...`; 21 | 22 | return ( 23 |
24 |

{displayText}

25 | 31 |
32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /lib/hooks/useSortOrder.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { parseAsString, useQueryState } from 'nuqs'; 4 | import config from '@/config'; 5 | 6 | export type SortOrder = 'newest' | 'oldest' | 'salary'; 7 | 8 | export function useSortOrder() { 9 | // Get default sort order from config or fallback to "newest" 10 | const defaultSortOrder = 11 | (config.jobListings?.defaultSortOrder as SortOrder) || 'newest'; 12 | 13 | const [sortOrder, setSortOrderState] = useQueryState( 14 | 'sort', 15 | parseAsString.withDefault(defaultSortOrder) 16 | ); 17 | 18 | // Validate sort order to ensure it's one of the allowed values 19 | const validSortOrder = 20 | sortOrder === 'newest' || sortOrder === 'oldest' || sortOrder === 'salary' 21 | ? sortOrder 22 | : defaultSortOrder; 23 | 24 | // Handle setting sort order with proper null handling 25 | const setSortOrder = (value: SortOrder | null) => { 26 | setSortOrderState(value === null ? null : value); 27 | }; 28 | 29 | return { 30 | sortOrder: validSortOrder as SortOrder, 31 | setSortOrder, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Tomas Laurinavicius 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /config/README.md: -------------------------------------------------------------------------------- 1 | # Configuration System 2 | 3 | This directory contains the configuration system for the job board. 4 | 5 | ## Quick Start 6 | 7 | 1. Copy `config.example.ts` to `config.ts` 8 | 2. Customize `config.ts` with your settings 9 | 3. The app will use your custom configuration 10 | 11 | ## How It Works 12 | 13 | - The source repository only includes `config.example.ts` as a template 14 | - When you fork the repository, you can create your own `config.ts` based on the example 15 | - Your custom configuration will override the example configuration 16 | - This approach allows you to pull updates from the source repository without conflicts 17 | 18 | ## Customizing Your Configuration 19 | 20 | To customize your configuration: 21 | 22 | ```bash 23 | # Copy the example configuration 24 | cp config/config.example.ts config/config.ts 25 | 26 | # Edit the configuration with your settings 27 | # (Open config/config.ts in your editor) 28 | ``` 29 | 30 | Then modify the values in `config.ts` to match your requirements. 31 | 32 | ## Configuration Options 33 | 34 | See `config.example.ts` for a complete list of configuration options and their descriptions. -------------------------------------------------------------------------------- /components/jobs/JobSearch.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated Use JobSearchInput component instead. 3 | * This component is maintained for backward compatibility. 4 | */ 5 | 6 | 'use client'; 7 | 8 | import { useEffect } from 'react'; 9 | import { JobSearchInput } from '@/components/ui/job-search-input'; 10 | import type { Job } from '@/lib/db/airtable'; 11 | import { useJobSearch } from '@/lib/hooks/useJobSearch'; 12 | import { filterJobsBySearch } from '@/lib/utils/filter-jobs'; 13 | 14 | export function JobSearch({ 15 | jobs, 16 | onSearch, 17 | }: { 18 | jobs: Job[]; 19 | onSearch: (filtered: Job[]) => void; 20 | }) { 21 | const { searchTerm } = useJobSearch(); 22 | 23 | // Filter jobs when search term changes 24 | useEffect(() => { 25 | const filtered = filterJobsBySearch(jobs, searchTerm || ''); 26 | onSearch(filtered); 27 | }, [jobs, searchTerm, onSearch]); 28 | 29 | return ( 30 |
31 | 35 |
36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /public/assets/mastercard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/ui/checkbox.tsx: -------------------------------------------------------------------------------- 1 | import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; 2 | import { Check } from 'lucide-react'; 3 | import * as React from 'react'; 4 | 5 | import { cn } from '@/lib/utils'; 6 | 7 | const Checkbox = React.forwardRef< 8 | React.ElementRef, 9 | React.ComponentPropsWithoutRef 10 | >(({ className, ...props }, ref) => ( 11 | 19 | 22 | 23 | 24 | 25 | )); 26 | Checkbox.displayName = CheckboxPrimitive.Root.displayName; 27 | 28 | export { Checkbox }; 29 | -------------------------------------------------------------------------------- /public/assets/applepay.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/ui/switch.tsx: -------------------------------------------------------------------------------- 1 | import * as SwitchPrimitives from '@radix-ui/react-switch'; 2 | import * as React from 'react'; 3 | 4 | import { cn } from '@/lib/utils'; 5 | 6 | const Switch = React.forwardRef< 7 | React.ElementRef, 8 | React.ComponentPropsWithoutRef 9 | >(({ className, ...props }, ref) => ( 10 | 18 | 23 | 24 | )); 25 | Switch.displayName = SwitchPrimitives.Root.displayName; 26 | 27 | export { Switch }; 28 | -------------------------------------------------------------------------------- /components/ui/badge.tsx: -------------------------------------------------------------------------------- 1 | import { cva, type VariantProps } from 'class-variance-authority'; 2 | import type * as React from 'react'; 3 | 4 | import { cn } from '@/lib/utils'; 5 | 6 | const badgeVariants = cva( 7 | 'inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', 8 | { 9 | variants: { 10 | variant: { 11 | default: 12 | 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80', 13 | secondary: 14 | 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80', 15 | destructive: 16 | 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80', 17 | outline: 'text-foreground', 18 | }, 19 | }, 20 | defaultVariants: { 21 | variant: 'default', 22 | }, 23 | } 24 | ); 25 | 26 | export interface BadgeProps 27 | extends React.HTMLAttributes, 28 | VariantProps {} 29 | 30 | function Badge({ className, variant, ...props }: BadgeProps) { 31 | return ( 32 |
33 | ); 34 | } 35 | 36 | export { Badge, badgeVariants }; 37 | -------------------------------------------------------------------------------- /app/jobs/not-found.tsx: -------------------------------------------------------------------------------- 1 | import { Search } from 'lucide-react'; 2 | import Link from 'next/link'; 3 | import { Button } from '@/components/ui/button'; 4 | import config from '@/config'; 5 | import { resolveColor } from '@/lib/utils/colors'; 6 | 7 | export default function JobNotFound() { 8 | return ( 9 |
10 |
11 |

Job Not Found

12 |

13 | The job posting you're looking for doesn't exist, has been 14 | removed, or has expired. 15 |

16 |

17 | Companies may remove job listings when positions are filled or no 18 | longer available. 19 |

20 | 21 | 32 | 33 |
34 |
35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /components/ui/about-schema.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import type { FC } from 'react'; 4 | import type { AboutPage, WithContext } from 'schema-dts'; 5 | import config from '@/config'; 6 | 7 | type AboutSchemaProps = { 8 | companyName?: string; 9 | description?: string; 10 | url?: string; 11 | logo?: string; 12 | }; 13 | 14 | export const AboutSchema: FC = ({ 15 | companyName = config.title, 16 | description = 'Learn about our mission to connect talented professionals with exciting career opportunities.', 17 | url = `${config.url}/about` || 'https://example.com/about', 18 | logo = config.nav?.logo?.enabled 19 | ? `${config.url}${config.nav.logo.src}` 20 | : undefined, 21 | }) => { 22 | // Create type-safe schema using schema-dts 23 | const aboutSchema: WithContext = { 24 | '@context': 'https://schema.org', 25 | '@type': 'AboutPage', 26 | name: `About ${companyName}`, 27 | description, 28 | mainEntity: { 29 | '@type': 'Organization', 30 | name: companyName, 31 | description, 32 | url: config.url, 33 | ...(logo && { logo }), 34 | }, 35 | url, 36 | }; 37 | 38 | return ( 39 |