Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗🌐 Live site: https://college-event-silk.vercel.app/
A website where NMAMIT users (@nmamit.in, @nitte.edu.in) book events and venues by looking at one common calendar.
It follows the NMAMIT website's look: navy and yellow, the NITTE logo, and campus photos. It works on both phones and desktops.
@nmamit.in and @nitte.edu.in emails can register. Each one is verified with a 6-digit code, with at most 5 tries.| Role | How you get it | What you can do |
|---|---|---|
| Member (student, faculty, staff) | Register with a college email | View the calendar, find slots, request bookings, track and cancel your own bookings, edit your profile |
| Venue in-charge | The admin picks you for a venue in the Admin Panel | Everything a member can do, plus the Approvals tab: approve or reject requests for your venues. Your own bookings there are approved instantly |
| Admin | make-admin command (see below) | Everything, for all venues, plus the Admin Panel: add or disable venues and assign in-charges. Admin bookings are approved instantly |
A fresh database is filled with these accounts, 11 NMAMIT venues and sample bookings:
| Account | Password | Role |
|---|---|---|
| [email protected] | Admin@123 | Admin |
| [email protected] | Incharge@123 | In-charge of Seminar Hall – ISE and Computer Lab – ISE |
| [email protected] | Demo@123 | Student |
⚠️ These passwords are public. On the live site, change them (My Profile → Change password) or replace these accounts with real people as soon as real users join.
Needs Python 3.10+.
pip install -r requirements.txt
python app.py
Open http://127.0.0.1:5000.
DATABASE_URL, it uses a local SQLite file (nmamit.db), created and filled with demo data on first run.DATABASE_URL in .env, it uses that Postgres database instead.FLASK_DEBUG=1 python app.py.Copy .env.example to .env and fill it in. .env is git-ignored and never uploaded to Vercel. Real environment variables (e.g. Vercel's) override .env.
| Variable | Needed? | What it does |
|---|---|---|
DATABASE_URL | Required on Vercel | Postgres connection string (e.g. from Neon). If empty, SQLite is used |
SECRET_KEY | Required on Vercel | Signs login cookies. Generate one with python -c "import secrets; print(secrets.token_hex(32))" |
SMTP_HOST, SMTP_USER, SMTP_PASS | Optional | Send real verification emails (see below) |
SMTP_PORT, SMTP_FROM | Optional | Defaults are 587 and SMTP_USER |
DEMO_OTP | Optional, demos only | One fixed 6-digit code for every sign-up |
DB_PATH | Optional | Location of the SQLite file when not using Postgres |
The app refuses to start on Vercel if DATABASE_URL or SECRET_KEY is missing, so a deployment can never quietly lose data or log everyone out.
Live deployment: https://college-event-silk.vercel.app/
Vercel needs Postgres because its servers keep no files between requests, so SQLite would lose data.
DATABASE_URL.-pooler).SECRET_KEY under Settings → Environment Variables.SMTP_* variables for real emails, or DEMO_OTP for a demo.Other details:
vercel.json pins the server to Singapore (sin1), next to the Neon database in ap-southeast-1, which keeps pages fast.public/static so Vercel serves them from its CDN..vercelignore keeps .env, the local database and the tests out of the upload.Make someone an admin
DATABASE_URL as Vercel in your .env, run:
flask --app app make-admin [email protected]
It should print [email protected] is now an admin.Make someone a venue in-charge
No email settings: the 6-digit code is printed in the server log. Locally that's the terminal. On Vercel it's the project's Logs tab.
Real emails (e.g. with a Gmail App Password):
$env:SMTP_HOST="smtp.gmail.com"; $env:SMTP_USER="[email protected]"; $env:SMTP_PASS="app-password"; python app.py
On Vercel, add the same values as environment variables instead.
Demo mode:
DEMO_OTP=123456 (any 6 digits).HttpOnly and SameSite=Lax. Data-changing API calls accept JSON only, which blocks cross-site form attacks.BEGIN IMMEDIATE..env (git-ignored) or Vercel's environment variables.python -m unittest test_app -v
5 tests:
The tests always use a temporary SQLite database and never touch DATABASE_URL from .env, so the live data is safe.
To run them on Postgres, point TEST_DATABASE_URL at a throwaway database. Its tables are dropped.
TEST_DATABASE_URL=postgresql://postgres:[email protected]:54329/postgres python -m unittest test_app
app.py Flask app: settings, database (SQLite/Postgres), booking logic, Smart Slot Finder, routes, API
test_app.py Tests
requirements.txt Flask, psycopg
vercel.json Vercel region (sin1)
.env.example Template for .env
.vercelignore Files kept out of the Vercel upload
public/static/
style.css All styles (NMAMIT navy/yellow theme, responsive)
app.js Shared JS: confirm dialogs, pop-up messages, mobile menu, timelines, form helpers
img/ NITTE logo, favicon, campus photos
templates/
base.html Header, tabs, mobile menu, messages, footer
index.html Home page
login.html, register.html, verify.html
calendar.html Common calendar (FullCalendar)
book.html Booking form with live availability and clash suggestions
finder.html Smart Slot Finder
venues.html Venue list with in-charges
my.html My Bookings
approvals.html In-charge/admin approval queue
admin.html Admin Panel
profile.html My Profile
_booking.html Shared booking card
_profile_fields.html Shared profile form fields
| Page | Path | Who |
|---|---|---|
| Home | / | Everyone |
| Log in / Register / Verify | /login, /register, /verify | Everyone |
| Common Calendar | /calendar | Logged in |
| Book a Venue | /book | Logged in |
| Smart Slot Finder | /finder | Logged in |
| Venues | /venues | Logged in |
| My Bookings | /my | Logged in |
| My Profile | /profile | Logged in |
| Approvals | /approvals | In-charges and admins |
| Admin Panel | /admin | Admins |
| API | Method | What it does |
|---|---|---|
/api/events?start=&end=&venues= | GET | Bookings for the calendar |
/api/availability?day=&duration=&attendees=&facility=&venue= | GET | Free and busy times per venue (Smart Slot Finder) |
/api/bookings | POST (JSON) | Create a booking. Returns 409 with suggestions on a clash |
/api/bookings/<id>/status | POST (JSON) | approve, reject (with note) or cancel |
/admin/venues | POST | Add a venue |
/admin/venues/<id>/toggle | POST | Enable or disable a venue |
/admin/venues/<id>/incharge | POST | Set a venue's in-charge |