# PokeCampus **Repository Path**: PracticalSemesterFinalProjectStudentsinRussia/poke-campus ## Basic Information - **Project Name**: PokeCampus - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-07 - **Last Updated**: 2026-10-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ========================================================================== PokéCampus — Campus Pokémon Card Collection and Exchange Platform 校园宝可梦卡牌收藏与交换平台 Software Engineering Project Training · Final Course Project ========================================================================== 1. ABOUT THE PROJECT -------------------- PokéCampus is a Java Web application for campus card collectors. Students record the physical card copies they own, keep a wish list, find a mutual exchange partner and complete the trade through a controlled two-sided confirmation process. Problems it solves: * duplicate cards are hard to reuse; * wish lists are scattered across chat messages; * it is hard to know whether a card is already promised in another trade. 2. MAIN FEATURES ---------------- * Card Library — 23 classic Base Set cards (images stored locally), search by name, filter by element and rarity. * My Collection — every physical copy is stored separately with its own condition (NM, LP, ...) and "tradable" flag; duplicate filter; copies reserved by a trade cannot be edited. * Wish List — card types the user wants to receive. * Trade Matches — MUTUAL wish-list matching: a pair is recommended only when A owns a card wanted by B, B owns a card wanted by A, both copies are tradable and neither is reserved. * Trade workflow — PENDING -> ACCEPTED -> both users confirm receipt -> COMPLETED (ownership of both copies is swapped in one DB transaction). Decline / cancel release reservations. * Reports — participants can report a trade; an administrator resolves reports and can activate/deactivate cards. * Profile — display name and bio. 3. TECHNOLOGY ------------- Front end : JSP, CSS, vanilla JavaScript (Fetch API + JSON, no page reload) Back end : Java 11, Jakarta Servlet 6, custom annotation-driven FrontController (@Controller / @RequestMapping / @ResponseBody) -> CampusController -> service layer Data : MySQL, JDBC with prepared statements, Apache Commons DBCP2 connection pool, transactions + SELECT ... FOR UPDATE row locks Security : PBKDF2-HMAC-SHA256 password hashing (210 000 iterations), HttpOnly session cookie, session-id rotation on login, CSRF token on every POST, login rate limit, admin role checks, security headers (nosniff, X-Frame-Options DENY, no-store) Server : Apache Tomcat 10.1 Build : Maven (WAR packaging), Maven Wrapper included Testing : scripts/verify.py — 9 groups of integration checks 4. USE OF AI ------------ Codex was used as a development assistant: organising requirements, drafting implementation code, investigating errors, designing test scenarios and preparing bilingual (EN/CN) documentation. All code was reviewed, run and verified by the team. The runtime matching logic does NOT use a hidden AI model — it is transparent SQL/Java rules (wish lists, availability, reservations). 5. PROJECT STRUCTURE -------------------- pom.xml Maven build (WAR "pokecampus") mvnw, mvnw.cmd, .mvn/ Maven Wrapper Start PokéCampus.command macOS double-click launcher scripts/run.sh build + run on a local Tomcat (port 8082) scripts/verify.py integration test script database/ create-database.sql.example create DB and DB user (edit password) schema.sql 6 tables demo-data.sql demo users, 23 cards, collections, trades src/main/java/cn/edu/neusoft/ framework/ FrontController, annotations, Handler, ModelAndView, RequestMethod pokecampus/controller/ CampusController (all *.action endpoints) pokecampus/service/ AuthService, CollectionService, TradeService, AppException pokecampus/dao/Database.java JDBC helper + connection pool pokecampus/security/ Passwords (PBKDF2) src/main/resources/ database.example.properties template for DB connection settings src/main/webapp/ WEB-INF/web.xml, WEB-INF/views/app.jsp assets/app.js, app.css, icon.svg, cards/*.png presentation/ PokeCampus_Final_EN.pptx main defense deck (English) PokeCampus_Final_CN.pptx Chinese version (same slide order) docs/ TEAM_ROLES.md detailed responsibilities of each member DEFENSE_SCRIPT_EN.md speaking script per slide PRESENTATION_ASSIGNMENT_RU.md who presents which slides (RU) GITEE_SUBMISSION.md Gitee submission checklist 6. DATABASE TABLES ------------------ users identity, PBKDF2 password hash, bio, role (MEMBER / ADMIN) cards card catalog (name, element, rarity, set, HP, image, active) collection physical copies: owner, condition, tradable, reserved_trade wishlist (user_id, card_id) — wanted card types trades sender, receiver, offered/requested copy, status, sender_confirmed, receiver_confirmed, note reports trade feedback and administrator resolution 7. HOW TO RUN ------------- Requirements: JDK 11+, Apache Tomcat 10.1, MySQL 8, Maven (or ./mvnw), Python 3 (only for the test script). Step 1. Create the database (as a MySQL administrator): edit CHANGE_ME in database/create-database.sql.example, run it, then import into database "pokecampus": database/schema.sql database/demo-data.sql Step 2. Configure the connection: copy src/main/resources/database.example.properties to src/main/resources/database.properties and set url / user / password. (database.properties is git-ignored and is NOT included.) Step 3a. Quick start on macOS (Homebrew openjdk@11 + tomcat@10): ./scripts/run.sh (background) ./scripts/run.sh foreground (or double-click "Start PokéCampus.command") ./scripts/run.sh stop NOTE: run.sh has default paths for one developer machine. On another computer set the variables first, e.g. export JAVA_HOME=... CATALINA_HOME=... export MAVEN_BIN=$(pwd)/mvnw MAVEN_REPO=$HOME/.m2/repository (run.sh builds with "mvn -o" — offline — so dependencies must already be downloaded once, e.g. "./mvnw package"). Step 3b. Any OS / IntelliJ IDEA: ./mvnw package (Windows: mvnw.cmd package) and deploy target/pokecampus.war to Tomcat 10.1. Step 4. Open http://127.0.0.1:8082/pokecampus/ (or http://localhost:8080/pokecampus/ for a default Tomcat). 8. DEMO ACCOUNTS (from demo-data.sql) ------------------------------------- username password role maksim PokeCampus2026! member lin PokeCampus2026! member (demo) mei PokeCampus2026! member (demo) admin PokeCampus2026! administrator New accounts can be registered in the UI (password 10–128 characters). 9. VERIFICATION --------------- With the application running and database.properties configured: python3 scripts/verify.py (optional: POKECAMPUS_URL=http://host:port/pokecampus/) The script creates temporary qa_* users, runs 9 groups of checks (authentication & CSRF, mutual matching, permissions, concurrent proposals and row locks, accept/confirm rules, atomic ownership swap, reports and moderation, profile and all 23 card images, logout) and then deletes only its own test data. Expected output: "ALL 9 INTEGRATION GROUPS PASSED". Note: cleanup calls /opt/homebrew/bin/mysql (macOS Homebrew path). 10. TEAM -------- 24401020117 仁华 coordinator; backend, FrontController, login, CSRF, exchange workflow (propose / accept / confirm) 24401020124 明浩 MySQL schema, JDBC queries, mutual matching, transactions and row locks 24401020107 萨沙 JSP / CSS / Fetch interface: catalog, collection, wish list 24401020126 任遥 integration and concurrency testing, admin functions, reports, permissions, stability 24401020134 期拉夫 requirements, bilingual documents, promotion plan, Gitee repository and final submission package Details: docs/TEAM_ROLES.md