About the project — a flight ticket aggregator for the Portuguese market. Performance optimization of key pages of the website is required.
⚠️ Important: Work has already been done on this task. It is necessary to analyze the project, study what has already been done and what remains to be completed before starting the execution.
Technical Information
- Framework: Next.js 14 (App Router)
- Hosting: Vercel
- Architecture: Monorepository for all domains (80 domains, on average 2 languages per domain)
- Docker & Redis: Needs to be deployed on our separate server (the server is available, setup is simple)
- CDN: Cloudflare
- Scale: Thousands of pages for SSG generation
- Geolocation API: Already integrated
- Documentation: Available in the project
What needs to be done
1. Remove all errors
0 runtime/console errors and warnings on the pages:
- Home
- Flights
- Cheap Flights Anywhere
- Destinations (all levels: continents, countries, cities)
2. Minimize the initial page weight
All optional components (calendar, modals, mobile/desktop menu, etc.) should load only upon user action.
Goal: reduce the size of the initial bundle and speed up page loading.
3. Optimize city and country files
There are 2 large JSON files with city and country data (large size, require optimization):
/data/cities/data/countries
Requirements:
- Set up loading of these files via Docker and Redis
- Ensure fast data delivery to the pages
- Do not include these JSON files in the overall client bundle
4. Implement SSG for Destinations pages
⚠️ Important: It is necessary to discuss the architecture in advance, as in the future we will store all countries and cities for all domains in all languages there.
What needs to be implemented:
Implement SSG (Static Site Generation) for Destinations pages
- Generate static pages for all routes
- Set up SSG for continents/countries/cities
API requests in SSG for dynamic content
- Pages are dynamic and require content loading
- During SSG: initially take the city from the domain (for example, Lisbon for tickets.pt)
- When the page is visited by the user: take their current location (location detection functionality is already implemented)
Acceptance Criteria
Target performance metrics (Google PageSpeed Insights):
- City and country pages: Green zone (mandatory)
- Homepage: Green zone (goal), yellow zone is acceptable
Current state: Website Performance Index in the red zone
Confirmation that:
✅ All errors have been eliminated — 0 console errors and warnings on the specified pages
✅ Optional components have been set to load on demand — calendars, modals, menus load only upon user action
✅ City and country JSON files have been optimized — data is loaded via Docker and Redis, not included in the client and server bundle
✅ SSG is set up for Destinations — static pages are generated considering the location from the domain, with the possibility of dynamic loading based on the user's geolocation
✅ Performance metrics have been achieved — green zone on city/country pages, at least yellow on the homepage
What we expect from the performer
- Analysis of the current state — assessment of the volume of work, study of what has already been completed
- Proposal for architecture for SSG Destinations pages (item 4)
- Phased implementation with reporting on tasks
- Testing on all specified pages
- Documentation on the changes made
Working Conditions
Payment: 12 USD per hour
Work format:
- Reporting on tasks
- Code review is mandatory (conducted by CTO)
- Communication during the work process
Requirements:
- Experience with Next.js 14 App Router
- Experience with Docker, Redis, Cloudflare CDN
- Knowledge of SSG and performance optimization
- Experience with monorepositories
- Understanding of Google PageSpeed Insights metrics
- Signing an NDA is mandatory
Deadlines and Next Steps
Please indicate:
- When you are ready to start
- Time estimate for completion (in hours)
- Experience with similar tasks
We are ready to discuss the details, provide access to the repository, and answer questions!