According to assignment we started to draft ideas and define business requests. After few sessions we decided to go with not just basic solution monolith backend API + Frontend SPA (single page application). We decided to create web portal, which will be like “entrance gate” for all users and also as content site, we expect in nearby feature have growing numbers of visitors. Sunbeds and Order Menu are stand-alone frontend SPA as we wanted to bring smooth user experience in ordering / booking. Same for Administration, as it needs to be 100% dynamic and fast for accepting orders, bookings.
Totally we have 2 backend services - for content we have CMS service (powered by Strapi) and API (powered by PHP with Symfony + API Platform + Doctrine). For frontend, we created monorepo with 4 frontend apps - Web Portal, Sunbeds, Order Menu, Business & Administration. Data are stored in two (content, core) PostgreSQL databases in Cluster and files are stored in S3-like storage (Spaces by DigitalOcean). Whole infrastracture is running in Digital Ocean and auto-deployed on staging(testing) or production environment in continuous deployment.
As portal is not just some SPA (single page application), we decided to go with Next.JS as frontend and Strapi (headless CMS) as backend. This technology is mature and , so we can rely on it in future also gives us advantage for fast development of content site like this. In a while we created content types in Strapi and instantly basic CRUD of API endpoints were ready for frontend. We created place, where you can find beaches or resorts (beach bars, restaurants, hotels) by country. Main goal was to have catalogue of resorts where you can book sunbeds.
Thanks to Next.JS and its stunning features like SSG / ISR website is super-fast with initial loading of document under 100ms! Content of beaches & resorts are managed by Strapi CMS. Sunbeds (offer, availabilities, bookings, …) are are processed in core (backend application powered by PHP). User can sign-up with e-mail, Google or Apple account. In his account can see bookings, orders, favourite places.
Guest of resort can in advance book sunbed with few clicks. In ease steps they can book sunbed and does not worry about free nice spot:
Every resort can setup a digital menu with optional function for ordering food and drinks. In comparision to old-school PDF, our Sunrero menu app offers user-friendly experience (categories, search, …), faster ordering, order tracking, fast payment with “Apple Pay” or “Google Pay”. Overall, an app enhances customer satisfaction and provides opportunities for business growth. Thanks to advanced features like branding customization, where you can setup your color scheme and upload logo, every menu looks unique.
Managers can set-up Sunbeds booking with variable modes of positioning (quantity mode if they don’t care about exact physical position of sunbed or grid mode). They can set-up availability of whole resort or for every sunbed. Pricing can be only flat for whole season or can have different price for each day of week or for specific date. Kitchen chef can setup order menu and with auto-translation can be in multiple languages in one shot. More information at sunrero.com/business.