Group8_GOAT_666 Sprint Essay 1 (November 21–22)
Sprint Essay — ShanHai-Travel Ver 4.0: an Eight-Day Sprint from Static Prototype to a Persistent Web Application
Project: ShanHai-Travel (山海行, an online travel platform) · Team: GOAT_666
Sprint: eight days, 2026-11-21 → 2026-11-28 · Scope: 120 story points, 35 issues
Course objective covered: CO3 — apply an engineering process to a real, incrementally delivered system
Repository: https://github.com/ZZH666-A11Y/shanhai-travel
Abstract
ShanHai-Travel Ver 3.0 was a thirteen-page static prototype: "login", "favourite", "publish" and "book" were
all simulated in localStorage, and a refresh destroyed every trace of them. Over eight days the team turned it
into a web application whose accounts, content, favourites and orders live in a MySQL database and are served by
an Express API of 53 route handlers, while keeping the visual system and page skeleton of the prototype intact.
The sprint was cut into four two-day blocks with a checkpoint at the end of each; 46, 82, 108 and finally 120
story points were verified at those checkpoints. This essay reports the goal, the burn-up, the running evidence,
the per-member code check-ins, the test results and the process data (PSP) of the whole sprint, and closes with
the difficulties that cost the most time and what the team would change.
1. Introduction
The assignment asked for one system, built incrementally, whose state survives a restart. Ver 3.0 satisfied
neither half of that sentence: it was a set of HTML files with inline demo scripts, and the "state" it showed
was a role string in browser storage. Two constraints framed the work:
- Do not redesign. The screens, the Tailwind token set (sand
#F6F2E9, pine#0E5A52, coral#E9663F),
the navigation and the grid had already been approved. The sprint replaced what is behind the screens. - No real money. Booking, payment and refund had to be executable end-to-end while producing no financial
transaction of any kind — a mock boundary the grader can inspect in the database.
A third, unwritten constraint emerged during block 1 and ended up shaping the last block: the result has to be
transferable. The database lives on one laptop, so the next team must be able to clone, seed, launch and test
the system from the repository alone.
2. Sprint design: one goal, four two-day blocks, one checkpoint each
The sprint goal was fixed on day 1 and never rewritten:
Turn the Ver 3.0 prototype into a deployable web application whose accounts, content, favourites and orders
survive a restart, without redesigning the existing UI.
The 120 story points were split into five workstreams and delivered in four blocks, so that every second day
ends with something demonstrable:
| Block | Days | Theme | Story points closed | Checkpoint |
|---|---|---|---|---|
| 1 | Nov 21–22 | Database, seed data, API skeleton (auth + catalogue) | 46 | 38 % |
| 2 | Nov 23–24 | Remaining API (social, booking, upload), first six pages wired | 36 (total 82) | 68 % |
| 3 | Nov 25–26 | Account centre, publishing, admin console, dashboard, testing | 26 (total 108) | 90 % |
| 4 | Nov 27–28 | Documentation, one-click launcher, clean-machine acceptance | 12 (total 120) | 100 % |
| Member | Student ID | Role in this sprint | Primary artefacts |
|---|---|---|---|
| 刘睿智 (Llzy-666) | 832401114 | Backend, database, integration, release | database/, backend/, scripts/ |
| 赵子涵 (ZZH66-A11Y) | 832401129 | Front end on all 13 pages | frontend/*.html, frontend/js/page-*.js |
| 张泽新 (zzx66689) | 832401127 | Test lead: harness, acceptance sheet, clean-machine run | scripts/smoke-api.ps1, docs/sprint/test-report.md |
| 何智铧 (LegendofLitang) | 832401111 | Test, content and evidence | seed copy, docs/screenshots/, robustness cases |
The 35 issues with owners, story points and the commit that closes each one are listed in
issues.md; that file is the source of truth every table below cites.
3. Burn-up chart

Figure 1 — Burn-up of the whole sprint. The coral dashed line is the scope frozen on day 1 (120 SP); the grey
line is the ideal burn-up (15 SP/day); the solid green line is work that was demonstrated at the end of each day,
not work that was "started". The four amber rings mark the checkpoints this essay's blocks were graded on:
46 SP (38 %) on Nov 22, 82 (68 %) on Nov 24, 108 (90 %) on Nov 26, 120 (100 %) on Nov 28. Velocity ran ahead of
the ideal line from day 2 to day 6 and flattened at the end, which is the expected shape: the last block was
documentation and clean-machine verification, not features.
4. What was built
4.1 Data foundation (block 1)
Seventeen tables in utf8mb4_unicode_ci, every child table carrying a foreign key, money as DECIMAL(10,2),
indexes on slug, region, category and status. Seed data was written to read like a real site rather than
like fixtures: nine destinations with galleries, eighteen tickets, eighteen experiences, nine packages, seven
hotels with fourteen room types, four add-ons, eight guides, four posts with seventeen comments, seven historical
orders, eight accounts and two notices. Two commands reproduce it from nothing:
node scripts\init-db.js # 17 tables + seed rows + 30 days of synthesised page views
node scripts\check-db.js # -> [check-db] database ok: 17 tables, 9 destinations.
4.2 Service layer
backend/ is Express 4 with a mysql2 pool, a JWT middleware trio (optionalAuth / requireAuth /requireAdmin), and one response envelope — {ok, message, data} — used by all 53 route handlers. Two
decisions mattered more than the endpoint count:
- Every query goes through
pool.execute. Real prepared statements remove an entire class of injection, at
the cost thatLIMIT ?cannot be parameterised; paging interpolates two integers afterNumber()casting
(written down as a convention, because it will bite the next contributor). - Payment is a state machine, not an integration.
POST /api/orderswritesorders+order_itemsinside a
transaction and returns a real order number (SH+ timestamp + counter);POST /api/orders/:id/payonly flipspending → paidand recordspay_method/paid_at, returningmock: true;cancelmovespending → cancelledandpaid → refunded. No payment SDK, no network call, no
amount leaves the machine.
4.3 Front end: deleting the demo, then filling the containers
The prototype's inline scripts were deleted rather than kept "for compatibility": a page that is authenticated
in two incompatible ways behaves differently after a refresh. In their place, two shared modules and five page
modules:
frontend/js/api.js— session (token inlocalStorage),SH.api()with 401 auto-clear, 40+ business methods,SH.money/SH.img/SH.esc/SH.toast.frontend/js/site.js— mounts the avatar/nickname/logout group intoa[data-session-login], page guards
(SH.site.guard('user'|'admin')), background token refresh.

Figure 2 — home.html, the landing page. Eight recommendations, three guides, two notices and the platform
counters all come from one GET /api/home call; the "为你准备" rail is reordered by the signed-in user's
favourites, which is why the payload carries a personalized flag. Before this block the same grid was a
hard-coded array.

Figure 3 — destinations.html. "找到 9 个景点" is the total of a paginated response; the region and category
chips are region / category query parameters resolved by SQL, the date window is a from/to pair, and the
sort selector maps to three ORDER BY variants. Search is debounced 300 ms behind a seq guard so a slow response
cannot overwrite a newer one.

Figure 4 — destination-detail.html. One aggregate call returns the destination, its gallery, tickets,
experiences, packages, comments and three related destinations. Posting a review recalculates AVG(rating) and
writes destinations.rating / review_count in the same handler, so the star row and the "1 286 条点评" counter
cannot drift apart.
4.4 Booking, account centre and publishing (block 3)

Figure 5 — booking.html, step 1 of 3. Package, room upgrade, ticket add-ons and extra experiences are priced
live; the sidebar shows the same number the server will store. 确认支付 creates the order and immediately calls
the mock pay endpoint, and the success dialog prints the real SH… order number plus the refund ladder
(100 % ≥ 3 days, 50 % within 48 h, 0 % on the day). 418 lines of local-stock demo logic were replaced by a 26 KB
module; the only client-side state left is a "rooms left" counter, documented as a demo affordance.

Figure 6 — profile.html, orders tab. Five tabs (overview / orders / stories / favourites / settings) lazy-load
their data. Each row is an orders record joined with its order_items; 支付 flips the chip from 待支付 to 待出行,
申请退订 moves a paid order to 已退款, and the top card ("下一段旅程") is the earliest paid order plus a day counter.
The password panel is a real PUT /api/auth/password, not the prototype's "即将上线" toast.

Figure 7 — publish.html. Cover upload, body editor with live word count and reading-time estimate, up to nine
gallery images and five tags, draft and publish paths, and an ?id= edit mode. Upload goes toPOST /api/upload (≤ 9 files, ≤ 5 MB, jpg/png/webp/gif) and the post is written through POST /api/posts.
4.5 Operations surface and deliverability (blocks 3–4)

Figure 8 — admin.html. Seven counters, a revenue card explicitly labelled 模拟支付, recent orders and recent
users, plus five management tabs with real CRUD. Deleting a destination that already has orders is refused by the
server with 409 and the UI explains why instead of failing silently; user roles are active / banned, and the
backend refuses to let an administrator demote themselves.

Figure 9 — insights.html. Totals 1 596 visits / 7 ticket orders / ¥4 096 mock revenue / 8 users, a 30-bar
trend chart, a category donut drawn with conic-gradient, a region ranking and a top-6 list — all aggregated
server-side from page_views and orders, with a zero-filled daily series so a quiet day still returns a point.
The reproduction path is itself a deliverable and was exercised on day 8:
git clone https://github.com/ZZH666-A11Y/shanhai-travel.git
cd shanhai-travel
.\scripts\start-local.bat # MySQL service -> .env -> npm install -> init-db -> server -> browser
start-local.bat checks four preconditions in order (service MySQL80 running, backend\.env present,backend\node_modules populated, check-db.js exit code) and reports the missing one instead of failing
half-way.
5. Code check-in records
The team integrated on one branch with five integration commits; because a commit is coarse, each issue is
mapped to a commit plus the file set that issue owns. The record below is the check-in table for the whole
sprint, and the commit links are the GitHub URLs a reviewer can open.
| Commit | Date | Subject | Issues closed |
|---|---|---|---|
| bd00f8e | 2026-11-21 21:40 | chore(db): add MySQL schema, seed data and one-click init scripts | #01–#05 |
| 3eb4043 | 2026-11-22 22:20 | feat(api): build Express + MySQL backend with 40+ REST endpoints | #08–#15 |
| 8fa743b | 2026-11-24 22:35 | feat(web): wire all 13 pages to the real API and drop localStorage demo state | #06, #07, #16–#26, #33 |
| a03bef9 | 2026-11-26 23:10 | docs(ops): add API reference, deployment guide and running screenshots | #27–#31 |
| cc54319 | 2026-11-28 19:30 | docs(release): finalize README, user report and sprint essays | #32, #34, #35 |
| Member | Issues | Commit | Files checked in | What the diff does |
|---|---|---|---|---|
| 刘睿智 | #02, #03, #04 | bd00f8e | database/schema.sql, database/seed.sql, scripts/init-db.js, scripts/check-db.js | 17 tables with FKs and indexes; ~120 seed rows including bcrypt hashes; multi-statement importer with --schema flag, 30-day page_views synthesis, 16-table readiness probe |
| 刘睿智 | #08, #09, #10 | 3eb4043 | backend/src/app.js, db.js, config.js, utils/http.js, middleware/auth.js, routes/auth.js, routes/catalog.js | pool + envelope + ApiError; JWT trio; register/login by username or e-mail; /destinations with 8 filters and paging; /destinations/:id aggregate with rating recalculation; /guides, /catalog, /home, /ai/plan rule engine |
| 刘睿智 | #11, #12, #13 | 3eb4043 | backend/src/routes/social.js, routes/booking.js, routes/upload.js | posts CRUD + three comment targets + favourites toggle; transactional POST /orders, order_no generation, mock pay, cancel/refund, order list with nested items; multer upload with limits |
| 刘睿智 | #14, #15 | 3eb4043 | backend/src/routes/admin.js (+ insights router in app.js) | overview KPIs, destination CRUD with a 409 guard on orders, guide/post status updates, notice CRUD, user role/status (self-demotion blocked); day / category / region aggregation with JS zero-fill, range clamped to 7 / 30 / 90 |
| 刘睿智 | #31, #32 | a03bef9, release | scripts/start-local.bat, docs/API.md, docs/DEPLOY.md, README.md, 使用报告.md | launcher with four preconditions; 11-section API reference incl. the order state machine; deployment guide (local / LAN / Ubuntu + nginx + pm2 + certbot, mysqldump migration); README and user report |
| 赵子涵 | #05 | bd00f8e | docs/API.md (contract half) | page-by-page audit of the 13 screens: every container id, every interaction the API must feed, every data-* attribute the prototype relied on |
| 赵子涵 | #06, #07 | 8fa743b | frontend/js/api.js, frontend/js/site.js | session store, fetch wrapper with 401 auto-clear, 40+ business methods, formatters and toasts; session-aware navigation, page guards, background token refresh |
| 赵子涵 | #16, #17 | 8fa743b | frontend/home.html, destinations.html, js/page-destinations.js | 8-card recommendation grid with a featured span-2 card, guide rail, notice bar, counters, AI dialog; 384-line ES5 listing module with 300 ms debounce, seq race guard, date window and three sort modes |
| 赵子涵 | #18, #19, #25 | 8fa743b | destination-detail.html, guides.html, guide-detail.html, favorites.html, login.html | detail bound to the aggregate response (85 KB → 64 KB, dead controls removed); escaped paragraph rendering for guide bodies; favourites with unfavourite; real login with ?next= whitelist and a register tab |
| 赵子涵 | #20, #21, #22 | 8fa743b | booking.html + js/page-booking.js, profile.html + js/page-profile.js, publish.html + js/page-publish.js | three-step wizard with live pricing, order creation and mock pay; five-tab account centre with order actions and password change; publish page with uploads, drafts and edit mode |
| 赵子涵 | #23, #24, #26, #33 | 8fa743b | admin.html, insights.html, all 13 HTML files | five admin tabs with dialogs and CSV export (7 sections, UTF-8 BOM); charts without a chart library; every sh_role / sh_demo_role reference removed; final spacing, empty-state and copy pass |
| 张泽新 | #27, #28, #34 | a03bef9, release | scripts/smoke-api.ps1, docs/sprint/test-report.md | 37 API + 6 page assertions with a Name/Status/Msg/Data table and a TOTAL/FAIL line; 20 manual cases with expected/actual, environment sheet, defect log, reproduction commands; clean-machine run |
| 何智铧 | #03 (content half) | bd00f8e | database/seed.sql (copy) | Chinese copy and proof-reading for 8 guides, 4 posts, 17 comments and 2 notices |
| 何智铧 | #29, #30, #35 | a03bef9, release | docs/screenshots/ (18 captures), docs/sprint/ | browser sweep with element counting; empty-state, long-content and viewport-matrix probing; the annotated capture set and the packaging of the submission folder |
Two documentation commits landed after the release commit and only touch this folder: 8bcc59e (the CSDN
publishing guide and the rubric checklist in docs/sprint/README.md) and its follow-up, which consolidates the
sprint write-up into the single essay you are reading and removes the earlier per-block drafts.
One further commit is a hotfix rather than release content:
5bf282dfix(web): repair login helper, launcher root and register validation — the three defects B-07…B-09 that only
appeared when the launcher and the login form were used by hand instead of by a script (see §6). It touchesfrontend/js/api.js, frontend/login.html, scripts/start-local.bat, .gitattributes and the two documents
whose counts it changes.
6. Verification and test results
Two suites were used and both were re-run after every fix. Everything in the table below is reproducible from
the commands in test-report.md §6.
| Suite | Cases | Pass | Fail | Notes |
|---|---|---|---|---|
Automated API (scripts/smoke-api.ps1) | 43 | 43 | 0 | 37 API + 6 page assertions; three are expected rejections — wrong password → 401, anonymous favourites → 401, non-admin overview → 403 |
| Manual acceptance (13 pages) | 20 | 20 | 0 | given/when/then cases, each asserting a count or a value rather than "looks right" |
| Clean-machine run (day 8) | 43 + 20 | all | 0 | deleted node_modules, dropped the schema, followed only the README |
Six defects were found during the sprint and closed before the release commit. A seventh, eighth and ninth
appeared at the first hand-over trial — when the team actually double-clicked the launcher and typed into the
login form instead of driving the site from a script. They are listed with the others because they are part of
the same record, and because they are the most instructive: every one of them sat in the seam between two
pieces that each worked on their own.
| ID | Symptom | Root cause | Fix |
|---|---|---|---|
| B-01 | Second page of the destination list repeated page 1 | LIMIT ? rejected by the prepared statement, the parameter silently dropped | interpolate Number(pageSize) / Number(offset); convention recorded |
| B-02 | A newly posted comment was fetched by the wrong id | re-read used WHERE id = LAST_INSERT_ID() on a different pooled connection | use insertId returned by the insert |
| B-03 | Insights dashboard was all zeros | page_views empty — the logging middleware had never seen a request | init-db.js synthesises 30 days / 1 596 rows; the API zero-fills the series |
| B-04 | Booking page listed three room types but priced "1 room" | room query filtered on hotel_rooms.city, a column that does not exist (city lives on hotels) | join hotel_rooms → hotels, order by price so the upgrade delta is never negative |
| B-05 | admin.html still authenticated through localStorage.sh_role | last page not migrated | SH.site.guard('admin') and the legacy keys deleted |
| B-06 | PUT /api/admin/users/:id {status:'disabled'} wrote nothing | backend enumerates active / banned only | UI offers exactly those values, backend asserts them |
| B-07 | Login with the correct password always answered "请输入用户名和密码" | SH.API.login was defined as login(username, password) but the page called it with an object — the object landed in body.username and the password vanished, so the server's own emptiness check fired | the client helper accepts both call shapes and normalises to {username, password} |
| B-08 | Double-clicking start-local.bat printed "Server stopped." one second later | the script took the project root from %~dp0, which is …\scripts\, so it looked for …\scripts\scripts\check-db.js and then pushd-ed into a non-existent …\scripts\backend | root resolved with pushd "%~dp0.."; the launcher also detects a listening port 3000 and reuses a healthy instance instead of dying; the file is kept CRLF, since an LF-only .bat makes cmd execute fragments of its own text |
| B-09 | Clicking "创建账号" on the register tab did nothing at all | the agreement checkbox was required, so the browser blocked the submit before any handler ran and the native message was invisible inside the scroll panel | both forms are novalidate; the handler validates every field itself and reports through the page toast |
Two findings were investigated and confirmed not to be defects: the booking page keeps a client-side "rooms
left" counter as a deliberate demo affordance, and /api/insights/overview is intentionally unauthenticated
because the dashboard is a public "platform activity" page — a decision recorded in 使用报告.md §4.4.
7. Process data (PSP)
7.1 Whole-sprint PSP by member and phase
| Member | Phase | Task (aggregated over the four blocks) | Est. (h) | Actual (h) | % of own effort |
|---|---|---|---|---|---|
| 刘睿智 | Plan | Sprint plan, schema conventions, integration schedule | 1.5 | 2.0 | 5 % |
| 刘睿智 | Design | Entity model, credential recovery plan, order state machine, package contents | 3.0 | 4.5 | 11 % |
| 刘睿智 | Code | schema.sql / seed.sql, init-db.js / check-db.js, Express bootstrap, auth, catalogue, social, booking, upload, admin, insights, start-local.bat | 21.5 | 22.0 | 52 % |
| 刘睿智 | Test | Call-through of every new endpoint, transaction rollback, 12 admin cases | 4.0 | 4.2 | 10 % |
| 刘睿智 | Fix | B-01/B-02 paging and insertId, B-03 page-view synthesis, B-06 status enumeration | 2.5 | 2.6 | 6 % |
| 刘睿智 | Review / Write | Front-end diff review before integration, docs/API.md, docs/DEPLOY.md, README.md, 使用报告.md | 6.5 | 6.6 | 16 % |
| 刘睿智 subtotal | 39.0 | 41.9 | 100 % | ||
| 赵子涵 | Plan | Page-priority ordering, page-by-page audit of the 13 screens | 2.5 | 3.0 | 7 % |
| 赵子涵 | Design | Endpoint ↔ container-id contract, naming of SH.API.* | 1.5 | 1.5 | 4 % |
| 赵子涵 | Code | api.js, site.js, and eleven page rewrites (home, destinations, detail, guides, guide detail, favourites, login, booking, profile, publish, admin, insights) | 32.5 | 33.8 | 83 % |
| 赵子涵 | Test | Console-level verification, click-through after the visual pass | 2.0 | 2.0 | 5 % |
| 赵子涵 | Review | Fact-check the two documents against the UI | 0.3 | 0.3 | 1 % |
| 赵子涵 subtotal | 38.8 | 40.6 | 100 % | ||
| 张泽新 | Plan | Test strategy for a three-tier app, environment checklist | 2.0 | 2.0 | 10 % |
| 张泽新 | Design | Acceptance-sheet structure (20 given/when/then cases) | 1.0 | 1.0 | 5 % |
| 张泽新 | Code | smoke-api.ps1: assertion helper, token handling, 12 → 43 assertions | 4.2 | 4.2 | 20 % |
| 张泽新 | Test | Execute the suites, triage 6 defects, retest, clean-machine run | 11.2 | 12.0 | 59 % |
| 张泽新 | Write | Test report (6 sections) and the defect documentation | 1.3 | 1.3 | 6 % |
| 张泽新 subtotal | 19.7 | 20.5 | 100 % | ||
| 何智铧 | Design | Content plan for the seed data (destinations, guides, posts, notices) | 1.0 | 1.2 | 7 % |
| 何智铧 | Code | Chinese copy and proof-reading for 8 guides / 4 posts / 17 comments / 2 notices | 2.0 | 2.0 | 12 % |
| 何智铧 | Test | Browser sweep with element counting, empty-state, long-content and viewport-matrix probing | 11.8 | 12.4 | 73 % |
| 何智铧 | Package / Review | Annotated capture set, submission-folder packaging, figure cross-check | 1.5 | 1.4 | 8 % |
| 何智铧 subtotal | 16.3 | 17.0 | 100 % | ||
| Team total | 113.8 | 120.0 | — |
7.2 Accumulated actual hours per block
| Member | Role | Block 1 | Block 2 | Block 3 | Block 4 | Total (h) | % of team effort |
|---|---|---|---|---|---|---|---|
| 刘睿智 (832401114) | Backend / integration | 14.0 | 11.0 | 9.4 | 7.5 | 41.9 | 35.2 % |
| 赵子涵 (832401129) | Front end | 9.0 | 12.4 | 14.7 | 4.5 | 40.6 | 34.1 % |
| 张泽新 (832401127) | Test / QA | 5.0 | 4.8 | 6.7 | 4.0 | 20.5 | 17.2 % |
| 何智铧 (832401111) | Test / content / evidence | 4.0 | 4.2 | 4.8 | 4.0 | 17.0 | 14.3 % |
| Team total | 32.0 | 32.4 | 35.6 | 20.0 | 120.0 h | 100 % |
Estimate accuracy across the sprint: 113.8 h estimated against 120.0 h actual — +5.4 %, concentrated in
block 1 (credential recovery) and block 3 (booking and profile, the two largest pages). Contribution ratio for
grading: 刘睿智 35 / 赵子涵 34 / 张泽新 17 / 何智铧 14, summing to 100.
8. Difficulties and lessons
(a) The database existed, but nobody knew its password. mysqld --skip-grant-tables is unusable on MySQL
8.0.46: with grant tables skipped the server refuses to open a TCP listener at all
([ERROR] [MY-010131] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS), and--skip-networking=0 is parsed as enabling skip-networking. The route that worked was a temporary server
started with --init-file whose single statement is ALTER USER 'root'@'localhost' IDENTIFIED BY '…';,
followed by mysqladmin shutdown and a normal service restart. A related trap: the init-file fails silently
per statement, so a statement that references a component that is not installed is skipped and every later
statement never runs — which looked exactly like "the password was not changed".
(b) Prepared statements cannot parameterise LIMIT. Because all SQL goes through pool.execute, LIMIT ?
raised ER_WRONG_ARGUMENTS at prepare time. Paging now interpolates two integers after casting; the rule is
written down because the next person adding a paged endpoint will hit the same wall.
(c) A demo is a contract you have to break explicitly. Every prototype page ended with a block that readlocalStorage.sh_role and painted accordingly. Layering the API on top would have produced pages authenticated
in two incompatible ways, behaving differently after a refresh. "Delete the demo block, do not negotiate with
it" turned out cheaper than any compatibility shim — and explains why the final sweep found exactly one page with
residue (B-05) instead of thirteen.
(d) The payload shape has to be decided once, at the boundary. The publish page needs "cover" and "gallery";posts.images is a JSON array while galleries elsewhere are a separate table. The rule fixed at the boundary:
the first element of images[] is the cover, enforced server-side (cover_image = images[0]). One line of
convention removed three possible divergences between pages.
(e) Money drifts unless the rounding point is fixed. The total is computed three times — in the browser, on
the server at insert time, and in the test suite that verifies the order. The first browser version rounded each
line before summing, so a ¥1 280 × 2 order with a ¥0.33 add-on displayed a different figure from the row the
server wrote. Fixed by keeping DECIMAL(10,2) in the database, summing unrounded values, and rounding only at
the last step; assertion #29 in the smoke suite now pins it.
(f) The most damaging bug was an empty table, not a broken query. The dashboard rendered a flat zero line and
the first instinct was a chart bug. The chart was fine; page_views had no rows because the logging middleware
only writes when a page is requested with Accept: text/html, and the schema had been created after the last
browsing session. An aggregation endpoint is only as trustworthy as its input volume, so init-db.js now owns
producing realistic history.
(g) Evidence discipline. Screenshots taken from a page whose data came from localStorage prove nothing
about the API. Every capture in docs/screenshots/ was taken with the server and database up, afterinit-db.js, with the session token set explicitly before the capture rather than reused from a tab — two
early captures were discarded because their header showed the admin identity while the body rendered for a
normal user.
9. Retrospective
What worked — keep. (1) Freezing the contract before touching pages: the page audit produced container ids
and endpoints in one document, so eleven page rewrites were fill-in-the-blanks jobs and the API shape never had
to be renegotiated. (2) One data entry point in the browser: when the error envelope changed shape once,SH.api() was the only file to touch. (3) Three one-line conventions ("first image is the cover", "every SQL
goes through pool.execute", "page scripts only talk to SH.API") each prevented a class of bug from
reappearing. (4) Evidence generated by commands a reviewer can re-run: the test report ends with four commands
that reproduce everything in it.
What hurt — change. (1) Coarse commits: five integration commits for 145 files made issue-level traceability
something to reconstruct from file sets; one commit per issue on per-member branches would have told the story by
itself. (2) The blocker was environmental, not technical: two days went into a lost MySQL credential, and
recording service ownership in the README on day 1 would have cost five minutes. (3) Testing started one block
late — the first two defects had already been found by hand before the harness existed. (4) Screenshot discipline
was learned the hard way (see §8g).
Try next sprint. A make verify entry point (schema check → smoke → build → screenshots) so "is it still
green?" is one command; seed data as fixtures the tests own rather than hand-written SQL the tests depend on; a
15-minute daily sync with a fixed three-question agenda (blocked / next / needs a decision) — the two longest
stalls of this sprint were both waiting on an unspoken question.
10. Where the project goes next
The sprint delivered a deployable local system, not a finished product. The remaining backlog, prioritised in使用报告.md §4:
| Priority | Item | Why it matters |
|---|---|---|
| A1 | Real route data for the hero and "为你准备" rail | the last visible static block on the landing page |
| A2 | guides.tags column so the guide tag row can render | a filter chip row is currently hidden by design |
| B1 | Replace the rule-based planner with a model-backed one | the assistant is the one feature users will judge as "AI" |
| B2 | PDF itinerary export for paid orders | the natural next step after a mock payment |
| B3 | Notification centre (order state, comment replies) | turns a passive order list into a product |
| C1 | Front-end build (Vite) and modularisation | 410 KB of local Tailwind runtime is fine for a prototype, not for growth |
| C2 | jest + supertest in CI | the 43 assertions deserve to run on every push, not by hand |
Deployment beyond one laptop is documented but not executed: docs/DEPLOY.md carries the Ubuntu + nginx + pm2 +
certbot path and the mysqldump migration procedure, so the next team can move the system to a server without
re-deriving it. The database itself stays on the developer's machine for now, and 使用报告.md §5 gives three
hand-over options (dump + import, hosted MySQL, containerised MySQL) with a one-page checklist.
11. Conclusion
Over eight days ShanHai-Travel moved from a thirteen-page prototype whose state lived in the browser to an
application whose accounts, content, favourites and orders live in MySQL and are served by a 53-handler API with
a mock payment boundary that never touches real money. The engineering value of the sprint is not the feature
count; it is that the system can be transferred — cloned, seeded, launched, tested and explained by someone who
was not in the room. That is what the last two days bought, and what the 120 story points were for.
References
- Course assignment sheet, Software Engineering (FZU–MU), Assignment 4 — Sprint Essays (sprint window,
essay cadence, burn-up and evidence requirements). - MySQL 8.0 Reference Manual — Server Options:
--skip-grant-tables,--init-file,--skip-networking;ALTER USER. - RFC 7519 — JSON Web Token (JWT).
- Express 4.x documentation — Routing, Error Handling, Static Files.
mysql2documentation — Promise API, Prepared Statements, Connection Pooling.- ShanHai-Travel repository, branch
main— https://github.com/ZZH666-A11Y/shanhai-travel
(the Ver 3.0 prototype is preserved on branchlegacy-ver3). - Project issue index and test report — issues.md, test-report.md.
相关推荐
【无人机路径规划】基于差分进化算法的三维航迹优化模型:Python实现与多目标适应度设计 项目介绍 Python实现基于差分进化算法(DE)进行无人机三维路径规划(含模型描述及部分示例代码)
内容概要:本文详细介绍了一个基于Python的无人机三维路径规划项目,采用差分进化算法(DE)在复杂三维环境中自动搜索从起点到终点的安全、高效飞行路径。项目构建了包含空间边界、起点、终点和多个长方体障碍物的三维环境模型,通过路径编码、适应度评估、差分进化优化及路径后处理四个核心环节实现路径规划。适应度函数综合考虑路径长度、碰撞惩罚、安全距离、转弯与爬升代价等因素,确保路径在安全性、平滑性和可行性之间取得平衡。算法通过变异、交叉和选择操作迭代优化种群,并引入路径简化机制减少冗余航点,提升可执行性。代码实现了完整的优化流程与三维可视化功能,便于分析与二次开发。; 适合人群:具备Python编程基础,熟悉NumPy、Matplotlib等科学计算与可视化库,对智能优化算法(如差分进化)和无人机路径规划有一定兴趣或研究需求的学生、研究人员及工程技术人员。; 使用场景及目标:①应用于低空物流、巡检监测、应急救援等实际无人机飞行任务的路径规划仿真;②作为差分进化算法在连续空间优化中应用的教学案例;③为后续集成地形数据、动态障碍物、飞行器动力学模型等高级功能提供可扩展的技术原型。; 阅读建议:建议结合文中提供的完整代码示例,动手运行并调试程序,观察不同参数(如种群大小、迭代次数、安全距离)对路径质量的影响,深入理解适应度设计与算法行为的关系,进而开展个性化改进与拓展实验。
A Survey of Variational Inference and Bayesian Computation Methods_变分推断与贝叶斯计算方法综述.md
ArxivReview学术论文研究综述,详细内容可访问:https://www.arxivreview.com/surveys
Safety Alignment and Adversarial Offense-Defense in Multimodal LLMs_多模态大语言模型安全对齐与对抗攻防综述.md
ArxivReview学术论文研究综述,详细内容可访问:https://www.arxivreview.com/surveys
代码+InceptionTime模型+血压估计
研究提出基于InceptionTime的端到端无袖带血压估计模型,利用多尺度一维卷积与残差连接有效提取PPG信号中的时序特征。在UCI数据集上,模型对收缩压和舒张压的预测MAE分别达8.26mmHg和4.49mmHg,表现出良好的非线性映射能力。尽管存在轻微过拟合及极端血压区间预测偏差,但整体性能稳定,为可穿戴设备连续血压监测提供了可行方案。
A Survey of Mixture-of-Experts Routing and Training Methods_混合专家路由与训练方法综述.md
ArxivReview学术论文研究综述,详细内容可访问:https://www.arxivreview.com/surveys


