尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A second-hand marketplace where college students buy and sell books, calculators, lab coats, cycles and hostel items. It has three AI features: personalised recommendations from search history, a fair-price predictor and a spam-listing detector.
Tech stack: Python · Flask · SQLite · scikit-learn · HTML/CSS/JS. It needs no internet connection or database server.
Live demo: https://campuskart-delta-lilac.vercel.app (demo data resets periodically, because Vercel gives each server instance a fresh copy of the database).
pip install -r requirements.txt
python seed.py # creates campuskart.db with demo data (run again any time to reset)
python app.py # open http://127.0.0.1:5000
Optional: python test_app.py runs automated tests of every page and flow. It resets the
database, so run python seed.py afterwards.
On the login page you can click any demo account to log in instantly.
| User | Password | What to show | |
|---|---|---|---|
| Admin | [email protected] | admin123 | Dashboard, AI-flagged listings, users, SQL explorer |
| Rahul Sharma (CSE, 3rd yr) | [email protected] | demo123 | Searched dbms book, python, laptop… → gets CS books and keyboard |
| Priya Patel (Mech, 2nd yr) | [email protected] | demo123 | Searched engineering drawing, drafter… → gets drawing tools and calculators |
| Karan Mehta (ECE, 3rd yr) | [email protected] | demo123 | Searched arduino, multimeter… → gets electronics |
| Aisha Khan (IT, 1st yr) | [email protected] | demo123 | Searched cycle, mattress, kettle… → gets hostel items and cycles |
| Neha Gupta (Civil, 1st yr) | [email protected] | demo123 | New user with no history → sees "Trending" (cold-start problem) |
Seller accounts (vikram, sneha, arjun, meera, rohan, ravi @college.edu) also use demo123.
arduno or calculatr: there's no exact match, but AI shows
"Did you mean…".USERS 1──N PRODUCTS N──1 CATEGORIES
USERS 1──N ORDERS N──1 PRODUCTS
ORDERS 1──1 REVIEWS
USERS M──N PRODUCTS (via WISHLIST, composite PK)
USERS 1──N SEARCH_HISTORY
USERS 1──N PRODUCT_VIEWS N──1 PRODUCTS
USERS 1──N NOTIFICATIONS
| Table | Purpose | Key constraints |
|---|---|---|
| users | students and admins | PK, UNIQUE email, CHECK role/year |
| categories | 9 item categories | UNIQUE name |
| products | listings | FK seller/category, CHECK price > 0, CHECK condition/status |
| orders | purchases | FK product/buyer, CHECK status |
| reviews | rating of a seller per order | UNIQUE order_id (1:1), CHECK rating 1-5 |
| wishlist | saved items | composite PK (user_id, product_id) |
| search_history | every search (AI input) | FK user, ON DELETE CASCADE |
| product_views | every product opened (AI input) | FK user, product |
| notifications | alerts, mostly from triggers | FK user |
added_at depends on the whole key.orders does not store seller_id,
because it can be derived through products, and seller rating is computed by a view
instead of being stored.| Trigger | When | What it does |
|---|---|---|
| trg_order_validate | BEFORE INSERT on orders | Aborts if the item is already sold or the buyer is the seller (prevents double selling) |
| trg_order_placed | AFTER INSERT on orders | Marks product sold and notifies the seller |
| trg_order_cancelled | AFTER UPDATE on orders | Puts product back on sale and notifies the seller |
| trg_wishlist_sold_alert | AFTER UPDATE on products | Notifies users who wishlisted a product when it is sold |
| trg_flagged_listing | AFTER INSERT on products | Notifies admins when AI flags a listing |
| trg_listing_moderated | AFTER UPDATE on products | Tells the seller their listing was approved or rejected |
v_product_details (4-table join), v_seller_ratings (AVG + GROUP BY), v_category_sales
(LEFT JOIN + SUM), v_admin_stats (scalar subqueries).
with db:, which commits on success and rolls back on error.
Buying is atomic: the order insert, the product status change and the notification either all
happen or none do.ON DELETE CASCADE.ai/)ai/recommender.py)weight × similarity across all signals, and that signal becomes
the explanation shown on the card.ai/price_predictor.py)ai/spam_detector.py)datetime('now') → NOW(), and RAISE → SIGNAL in triggers).report/CampusKart_IEEE_Report.docx (editable) and report/CampusKart_IEEE_Report.pdf are
in IEEE two-column A4 conference format. Before submitting, replace the yellow-highlighted
placeholders (author names, department, college, guide) in the Word file and export it to PDF again.
All diagrams are in report/figures/ as 300-dpi PNGs: ER diagram, relational schema,
architecture, DFD level 0 and level 1, use case, recommendation flowchart, purchase sequence
diagram, and website screenshots. To regenerate them:
python report/make_diagrams.py # diagrams
python report/take_screenshots.py # screenshots (app must be running; run seed.py afterwards)
campuskart/
├── app.py Flask routes (auth, search, products, orders, admin)
├── schema.sql tables, indexes, triggers, views
├── seed.py demo data (users, 58 products, histories, orders)
├── test_app.py automated tests
├── ai/
│ ├── recommender.py AI 1: TF-IDF recommendations
│ ├── price_predictor.py AI 2: linear regression pricing
│ └── spam_detector.py AI 3: Naive Bayes spam filter
├── templates/ HTML pages (Jinja2)
└── static/style.css styling (no external CSS framework)