Skip to content

Commit bdd9396

Browse files
committed
refactor directory structure to only include frontend
1 parent cfcce3f commit bdd9396

File tree

87 files changed

+1522
-1856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1522
-1856
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
updates:
33
# Frontend npm dependencies
44
- package-ecosystem: "npm"
5-
directory: "/frontend"
5+
directory: "/"
66
schedule:
77
interval: "weekly"
88
open-pull-requests-limit: 10
@@ -22,4 +22,4 @@ updates:
2222
- package-ecosystem: "github-actions"
2323
directory: "/"
2424
schedule:
25-
interval: "monthly"
25+
interval: "monthly"

.github/workflows/azure-deploy-frontend-dev.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Frontend - Build and Deploy on Azure
22

33
on:
44
push:
5-
branches: [ development ]
5+
branches: [development]
66
paths:
7-
- 'frontend/**'
8-
- '.github/workflows/azure-deploy-frontend-dev.yml'
7+
- "**"
8+
- ".github/workflows/azure-deploy-frontend-dev.yml"
99
workflow_dispatch:
1010

1111
env:
@@ -52,8 +52,8 @@ jobs:
5252
- name: Build and push Docker image
5353
uses: docker/build-push-action@v6
5454
with:
55-
context: ./frontend
56-
file: ./frontend/Dockerfile
55+
context: .
56+
file: ./Dockerfile
5757
push: true
5858
tags: ${{ steps.meta.outputs.tags }}
5959
labels: ${{ steps.meta.outputs.labels }}
@@ -83,4 +83,4 @@ jobs:
8383
environmentVariables: |
8484
NOTION_API_KEY=${{ secrets.NOTION_API_KEY }}
8585
NOTION_DATABASE_ID=${{ secrets.NOTION_DATABASE_ID }}
86-
MONGODB_URI=${{ secrets.MONGODB_URI }}
86+
MONGODB_URI=${{ secrets.MONGODB_URI }}

.github/workflows/lint-checker.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@ name: Frontend Lint Checker
33
on:
44
pull_request:
55
paths:
6-
- 'frontend/**'
6+
- "**"
77

88
jobs:
99
verify:
1010
runs-on: ubuntu-latest
1111
defaults:
1212
run:
13-
working-directory: ./frontend
14-
13+
working-directory: .
1514
steps:
1615
- uses: actions/checkout@v4
1716

1817
- name: Setup Node.js
1918
uses: actions/setup-node@v4
2019
with:
21-
node-version: '20'
22-
cache: 'npm'
23-
cache-dependency-path: './frontend/package-lock.json'
20+
node-version: "20"
21+
cache: "npm"
22+
cache-dependency-path: "./package-lock.json"
2423

2524
- name: Install dependencies
2625
run: npm ci
@@ -35,4 +34,4 @@ jobs:
3534
run: npx prettier --check .
3635

3736
- name: Build
38-
run: npm run build
37+
run: npm run build

.gitignore

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ npm-debug.log*
44
yarn-debug.log*
55
yarn-error.log*
66

7-
# MonoRepo Specific
8-
/packages/*/node_modules/
9-
**/dist/
10-
**/build/
7+
# Next.js
8+
.next/
9+
out/
10+
.vercel/
11+
12+
# Env files
13+
.env*.local
14+
.env.*.local
1115

1216
# OS-specific
1317
.DS_Store
@@ -33,8 +37,6 @@ coverage/
3337
*.sqlite
3438

3539
# Miscellaneous
36-
.env
37-
.env.local
3840
*.local
3941
*.lock
4042
*.bak
@@ -62,7 +64,8 @@ desktop.ini
6264
# Lock file for pnpm
6365
pnpm-lock.yaml
6466

65-
/repo-to-text/
66-
6767
# Typescript build info
68-
frontend/tsconfig.tsbuildinfo
68+
tsconfig.tsbuildinfo
69+
70+
# Docker
71+
Dockerfile.*.env
File renamed without changes.
File renamed without changes.
File renamed without changes.

README.md

Lines changed: 104 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,151 @@
1-
# MAC Job Board
1+
# MPloy Job Board
22

33
Hey there! 👋
44

55
This is a modern, intelligent job board platform that automatically aggregates job listings, providing users with a streamlined experience to search, filter, and discover relevant opportunities. The platform updates daily with fresh listings through our smart AI robots.
66

77
## Features 🚀
8+
89
- Jobs update automatically every single day from various sources (automatically deduplicated)
910
- We use AI to help fix, sort and summarise the listings
10-
- You can filter for exactly what you want (e.g. Big Tech Intern Roles for Interational students)
11+
- You can filter for exactly what you want (e.g. Big Tech Intern Roles for International students)
1112
- Works perfectly on phone or laptop
13+
- Server-side rendering (where possible) with Next.js 15 App Router
14+
- Multiple filters can be applied at once, including a text search filter
15+
- Desktop/mobile responsive UI: list/details on desktop, modal on mobile
16+
- State persists in URL: search, filters, pagination (`/jobs?q=dev&location=sydney&page=2`)
17+
- Direct job links supported (`/jobs/[id]`)
18+
- Parallel data fetching for faster loads
19+
- Real-time job search with debouncing
20+
- Data refreshed daily via Go scraper (not open source)
21+
- Around 1k jobs, each ~4kB
22+
23+
## Tech Stack
1224

13-
## Frontend
25+
### Frontend
1426

1527
- Next.js 15: Utilizing the App Router for server-side rendering and optimized client-side navigation
1628
- React 19: For building the interactive user interface components
1729
- TypeScript: Ensuring type safety across the codebase
18-
- Mantine UI: For consistent, accessible UI components
1930
- Tailwind CSS: For utility-first styling and responsive design
2031

21-
## Backend
32+
### Backend (Data Layer)
2233

23-
- Server Actions: Answers search and feedback requests
34+
- Server Actions: Handle search and feedback requests
2435
- MongoDB: Stores job listings and related metadata
25-
- GoLang: Powers our web robots (this part is not open source)
2636

2737
## Getting Started
2838

2939
### Prerequisites
40+
3041
- Node.js 20+
31-
- Java 17
32-
- Go 1.21+
3342
- Docker & Docker Compose
34-
- Redis
43+
- MongoDB (local or cloud, set MONGODB_URI)
3544

3645
### Local Development
46+
3747
```bash
38-
# Start all services
48+
# Start with Docker (includes dev server)
3949
docker compose -f docker-compose.dev.yml up
4050
# Alternative if Make is installed
4151
make dev
4252

43-
# Frontend only
44-
cd frontend
53+
# Or run frontend directly
4554
npm install
4655
npm run dev
47-
48-
# Backend only
49-
cd backend
50-
./gradlew bootRun
5156
```
5257

5358
## Development Guidelines
5459

55-
### Git Workflow
60+
### Naming & File Structuring Conventions
61+
62+
- Everything uses kebab-case `product-card.ts` unless there's an agreed standard e.g. `useCustomHook` for hooks
63+
- Group related components in feature directories (e.g. `components/layout/search/filter/` contains all components used for search filtering)
64+
- Most UI components are 50-150 lines of code. Keep pages thin, move complex logic to components
65+
- Use layouts for shared UI across routes
66+
67+
### State Management & Data Passing Patterns
68+
69+
- Begin with simple props passing - max 2 levels of components
70+
- When stateful logic needs to be reused, move it to custom hooks
71+
- When props drilling becomes cumbersome or state needs to be widely available, use Context (e.g. the global filter state of jobs should be context)
72+
- Pre-fetch the data in the next job page
73+
- Load the essential data first and display the page, while other job listings and details are being loaded
74+
- Implement parallel data fetching when possible
75+
76+
### Next / React Features
77+
78+
- Intercepting Routes: Use intercepting routes for modal-like experiences
79+
- Lazy Loading: use when we can defer the loading of heavy components
80+
- Error Boundaries: define error.tsx files to catch errors to prevent the entire site from breaking
81+
- Add `<Suspense/>` boundaries for loading state
82+
- Use useMemo for expensive calculations (e.g. filtered results)
83+
- Use useRef to maintain filter input values
84+
85+
## Frontend Structure
86+
87+
```
88+
├── next.config.ts # Next.js configuration, API routes, environment
89+
├── src
90+
│ ├── app
91+
│ │ ├── error.tsx # Global error boundary UI
92+
│ │ ├── jobs
93+
│ │ │ ├── [id] # Dynamic route for individual job pages
94+
│ │ │ │ ├── @modal # Intercepted route - shows job details as modal on mobile
95+
│ │ │ │ ├── page.tsx # Individual job page UI
96+
│ │ │ ├── error.tsx # Job section error boundary
97+
│ │ │ ├── layout.tsx # Job section layout wrapper (includes JobsProvider)
98+
│ │ │ ├── loading.tsx # Job section loading state
99+
│ │ │ ├── page.tsx # Main jobs listing page
100+
│ │ ├── layout.tsx # Root layout with nav and theme providers
101+
│ │ ├── page.tsx # Home page (redirects to /jobs)
102+
│ ├── components
103+
│ │ ├── jobs
104+
│ │ │ ├── details
105+
│ │ │ │ ├── job-card.tsx # Individual job preview card
106+
│ │ │ │ ├── job-details.tsx # Full job details view
107+
│ │ │ │ ├── job-list.tsx # Container for job cards with virtualization
108+
│ │ │ ├── filters
109+
│ │ │ │ ├── dropdown-filter.tsx # Reusable filter dropdown
110+
│ │ │ │ ├── dropdown-sort.tsx # Sort options dropdown
111+
│ │ │ │ ├── filter-section.tsx # Container for all filters
112+
│ │ │ ├── search
113+
│ │ │ │ └── search-bar.tsx # Search input with suggestions
114+
│ │ │ ├── layout
115+
│ │ │ │ └── logo.tsx # Site logo component
116+
│ │ │ │ └── nav-bar.tsx # Navigation bar
117+
│ ├── context
118+
│ │ ├── jobs
119+
│ │ │ └── filter-context.tsx # Job state and actions context
120+
│ │ │ └── jobs-provider.tsx # Provider wrapper with initial state
121+
│ ├── hooks
122+
│ │ ├── use-job-filters.ts # Filter logic and state management
123+
│ │ ├── use-job-search.ts # Search functionality and API calls
124+
│ │ ├── use-pagination.ts # Pagination state and navigation
125+
│ │ ├── use-url-state.ts # URL parameters sync with app state
126+
│ ├── lib
127+
│ │ ├── theme.ts # Theme configuration
128+
│ ├── types
129+
│ │ └── api.ts # API response/request types
130+
│ │ └── filters.ts # Filter option types
131+
│ │ └── job.ts # Job data types
132+
├── tailwind.config.ts # Tailwind CSS configuration
133+
```
134+
135+
## Git Workflow
56136

57137
#### Branch Structure
138+
58139
- `main` - Production branch
59140
- `dev` - Development branch
60141
- Feature branches follow the pattern:
61142
```
62143
<component>/<developer>/<feature-name>
63144
Examples:
64-
- backend/edwn/redis-caching
65-
- frontend/sarah/job-filters
145+
- ui/edwn/dark-mode
146+
- jobs/sarah/advanced-filters
66147
```
67-
148+
68149
## License
69-
This project is licensed under the MIT License.
150+
151+
This project is licensed under the MIT License.

backend/.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

backend/.gitignore

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)