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 |