尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Yumcha helps you and your friends find a good place to lepak (hang out). Start with cafes near you, see what they're like before you go, and read or share real experiences from other people.
Status: early development. Version 1 is a mobile-friendly website. Features below marked with 🚧 are planned, not built yet.
Version 1 (built)
/kopi-kawan/) with all the details and a link to the area on a mapVersion 2 (built, needs one-time setup: see "Set up the community" below)
Version 3 (built, needs supabase/community.sql once)
Next
Later
data/cafes.js) for v1js/vendor/, version 2.117.3, MIT licence)git clone https://github.com/Pie0625/yumcha.git
cd yumcha
localhost or https):
python3 -m http.server 8000
Then visit http://localhost:8000. It forwards to /home/, and each cafe lives at an address like /kopi-kawan/.The cafes in data/cafes.js are made-up samples for testing, not real places.
Each cafe has its own page address (/kopi-kawan/), made from its id in data/cafes.js. After you add, rename or remove a cafe, regenerate the pages (needs Node.js):
node tools/build-pages.js
Use lowercase letters, numbers and dashes in the id. Then commit the new folder along with the data change.
A cafe can have one photo or several. In data/cafes.js:
id: 'kopi-kawan',
photos: [
'https://res.cloudinary.com/your-name/image/upload/kopi-kawan-1.jpg',
'https://res.cloudinary.com/your-name/image/upload/kopi-kawan-2.jpg',
],
images/ folder and write the path ('images/kopi-kawan-1.jpg').The pictures in images/ right now are drawn sample illustrations (.svg) that stand in for photos of the made-up cafes.
The community needs a free Supabase project. Until you do this, cafe pages just say "coming soon". You only do it once.
supabase/schema.sql, and press Run. This also switches on the security rules, so please don't skip it.js/config.js. These two are public and are meant to be in the website. Never copy the service_role or secret key into this repository.https://pie0625.github.io/yumcha/ and add these under Redirect URLs:
https://pie0625.github.io/yumcha/**http://localhost:8000/** (for testing on your computer)https://YOUR-PROJECT-REF.supabase.co/auth/v1/callback (Supabase shows the exact address on the Google provider page).js/config.js, set enableGoogle: true.js/config.js change, merge it into main, and open a cafe page on your site.After schema.sql has run, do the same with the second file: SQL Editor, paste all of supabase/community.sql, press Run. It creates the posts, reactions and reports tables, their security rules, and a public storage bucket called post-photos (JPEG only, 2 MB per photo, and people can only add or delete files in their own folder). It is safe to run again.
reports table lists what people reported. To remove a post, delete its row from experiences. For the Community page, read post_reports and delete the post from the posts table. Photo files stay in Storage, then post-photos until you delete them there.yumcha/
├── index.html # forwards to /home/
├── home/ # the list of cafes (yumcha/home/)
├── kopi-kawan/ ... # one folder per cafe, made by the script (yumcha/kopi-kawan/)
├── tools/ # build-pages.js and the cafe page template
├── css/styles.css # styles
├── js/app.js # list page: filters, sorting, location
├── js/detail.js # cafe page
├── js/common.js # shared helpers (photos, escaping)
├── community/ # the Community page (yumcha/community/)
├── js/auth.js # shared Supabase connection, sign in and report dialogs
├── js/community.js # experiences on the cafe pages
├── js/feed.js # the Community page: posts, photos, ratings, reactions
├── js/config.js # your Supabase project URL and public key
├── js/vendor/ # Supabase browser library (a copy, so no outside download)
├── supabase/ # schema.sql and community.sql: tables and security rules, run once each
├── data/cafes.js # sample cafe data
├── images/ # cafe pictures (sample illustrations for now)
├── icons/ # logo and favicons (logo.svg is the master)
└── README.md
This is a personal learning project. Ideas and suggestions are welcome. Open an issue to share one.
Made by @Pie0625.