-
Built upon Next.js 14 App Router, using latest React technology React Server Component
-
Utilize React Query + Server Actions for prefetch data and API calls, covers API endpoints, improve content first load time, and reduce unnecessary data fetching by caching.
-
Uses framer-motion animation libaray, provide smooth animation upon layout change*
-
Persisted search history by Jotai, saves every search update to local storage and restores on page load.
-
Based on TypeScript, ensures type safety and code quality across the codebase.
-
Responsive design, optimized for mobile devices.
-
Easy, just visit this live site or follow section below to run the project locally.
-
Choose province for origin and destination, city selection will be available after you select province.
-
Choose courier of your choice, weight of the package (in gram) and calculate the cost by clicking enter or the big "Hitung" button.
-
After a ms, the available services alongside the costs variety will be displayed below in search history.
-
Upon page leave or refresh, the search history will be saved and available for your next visit.
-
Clone the repo
git clone https://github.com/yusrmuttaqien/dotkurir-site.git
-
Open terminal and navigate to the project directory
cd dotkurir-site
-
Install all dependencies
npm install # or bun install
-
Initialize required environment variables
.env
in root directory (one level with/src
folder)RAJA_ONGKIR_API_KEY=... RAJA_ONGKIR_BASE_URL=...
Note:
RAJA_ONGKIR_API_KEY
is your Raja Ongkir API key, retrive it from your account panelNEXT_PUBLIC_BASE_URL
is the base URL of Raja Ongkir's API. The base URL should matches your account type (starter or pro). If link before doesn't work
-
Run the development server
npm run dev # or bun run dev
-
Open http://localhost:3000 with your browser to see the local website.