WallpaperMachine
당신이 사랑하는 배경화면, 맥에서 새롭게 만나보세요
Thai Travel AI는 태국 전역 로드트립 일일 계획을 AI와 함께 제공하고, 도로 경로·주유소·식당·숙소 정보를 77개 주에 안내한다
Thai Travel AI ผู้ช่วยวางแผน Road Trip ทั่วไทย คุยกับ AI ภาษาไทย รับแผนรายวัน พร้อมเส้นทางถนนจริง ปั๊มน้ำมัน ร้านอาหาร และที่พักใน 77 จังหวัด
라이프스타일JavaScript · CSSGitHub @tanyimcoffee-hub온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗AI Travel Planner สำหรับวางแผนท่องเที่ยวในประเทศไทย โดยเน้น Road Trip
สร้าง AI ที่เข้าใจภาษาไทย ช่วยวางแผนการเดินทาง และทำงานร่วมกับข้อมูลสถานที่จริงได้
The AI can accept a travel request in Thai and return a structured sample itinerary.
GROQ_API_KEY=... in ai-engine/.env (never commit it), then install both packages:cd ai-engine && npm install
cd ../services/api && npm install
cd services/api
npm start
python -m http.server 8080
The page calls http://localhost:3000. Override it with window.TRAVEL_API_BASE_URL before script.js loads, or add ?api=http://host:port to the page URL.
When the page is opened from localhost, 127.0.0.1 or a file, it calls the API at http://localhost:3000. On any other host (for example a Vercel URL) it calls /api on the same domain.
Groq's free tier allows about 8,000 tokens per minute, which is roughly one plan per minute. When the quota is full the API answers 503 and the page asks the user to wait.
The repo deploys as one Vercel project: the root HTML/CSS/JS are served as static files, and every /api/* request goes to one serverless function (api/index.js) that runs the same Express app as services/api (services/api/app.js).
Files involved:
package.json (repo root): dependencies the function needs (express, cors, dotenv, groq-sdk).api/index.js: exports the Express app as the function.vercel.json: sends /api/* to the function, bundles data/places/**, places_bkk_cnx.json and ai-engine/system-prompt.md with it, and allows up to 60 s per request.Steps:
tanyimcoffee-hub/AFO_team_fatzone.GROQ_API_KEY with your Groq key. Optional: OSRM_URL to use your own routing server.main, either set it as the Production Branch in Settings → Git, or open the branch's Preview deployment.https://<your-project>.vercel.app/api/health, then open the site and create a plan.Notes:
GROQ_API_KEY in the code. If it is missing, /api/plan answers 503 with a clear message.OSRM_URL.To test the same setup locally, install the Vercel CLI and run vercel dev from the repo root (it needs GROQ_API_KEY in a root .env, which is git-ignored).
Repo root, sharing styles.css and script.js (the browser script; not to be confused with services/api/app.js):
index.html (landing): quick-start box (origin, destination, days) that opens the chat page, ready-made trip templates, auto-scrolling feature cards, a region picker for all 77 provinces and a per-province place explorer.plan.html (chat page): a large chat window (trip form, AI replies, reply box for follow-up questions) next to a large map. Links can prefill it, e.g. plan.html?origin=กรุงเทพมหานคร&destination=จันทบุรี&days=2&go=1 (go=1 sends to the AI right away; other params: budget, travelers, tripType, interest)./api/route, with total distance and driving time. If routing fails, it falls back to a dashed straight line and says so. If Leaflet cannot load, an illustrative SVG diagram is shown instead.services/api)| Method | Path | Notes |
|---|---|---|
| GET | /api/health | Status check |
| POST | /api/plan | Body: origin, destination (required), days, budgetTHB, interests[], tripType (one_way/round_trip), travelers (1–50), message (follow-up text, ≤1000 chars), history (≤20 × {role: user|assistant, content}). Returns data = AI response (reply, status, trip, itinerary; stops get lat/lon when known) and meta (places sent, provinces, approximate origin/destination points, attribution). |
| GET | /api/places | Query: province (Thai or English name), type, q, limit (1–200, default 50), offset. |
| GET | /api/places/provinces | All 77 provinces with counts per type. |
| POST | /api/route | Body: points (2–25 × {lat, lon} in driving order). Returns distanceKm, durationMin, legs, geometry ([lat, lon] list) and attribution. Uses the public OSRM demo server by default (free, no key, best effort); set OSRM_URL to use another OSRM server. 400 bad input, 422 no road route, 502 routing service unavailable. |
Errors are { success: false, error } with 400 (bad input), 404 (unknown province), 502/503 (AI quota or bad AI output) or 500.
Tests: npm test in services/api (store) and in ai-engine (validators).
See data/places/README.md. Starter data comes from OpenStreetMap (© OpenStreetMap contributors, ODbL) and is marked unverified. Travel Data team files in data/places/team/ (and the original places_bkk_cnx.json) override OSM rows.