Apply For China FAQ Hub
Search WhatsApp questions, scripts, service answers, document guidelines, and visa references.
Editor README
What This Is
The Apply For China FAQ Hub is a private online FAQ tool for consultants.
Live site:
http://staff.applyforchina.com:8000/faq
Consultants can use it to:
- Search questions, answers, and keywords
- Open answers from dropdown cards
- Copy answers for WhatsApp replies
- View the latest shared FAQ content
Approved editors can also:
- Add new FAQ entries
- Edit existing entries
- Delete entries
- Reorder entries by using the Drag handle
How Access Works
1. Cloudflare Access
Cloudflare controls who can open the website.
Consultants enter their email address, receive a one-time code, and use that code to enter the site.
Use Cloudflare to add or remove consultants.
2. Firebase Editor Login
Firebase controls who can edit the FAQ database.
Only these editor emails are approved:
- info@applyforchina.com
- surbhikesh@gmail.com
Consultants do not need Firebase accounts unless they should be editors.
Editor Login Details
Editor emails:
- info@applyforchina.com
- surbhikesh@gmail.com
Editor password:
@Taro123@@
Keep this password private and share it only with approved editors.
Managing Consultant Access
Use Cloudflare Access for consultant access.
Add A Consultant
- Log in to Cloudflare.
- Go to Zero Trust.
- Go to Access controls.
- Go to Applications.
- Open the Apply For China FAQ Hub application.
- Scroll down to Access policies.
- Click Consultants Only.
- Click Configure.
- Scroll down to Configure rules.
- Under Emails, add the consultant's email address.
- Save the policy.
The consultant can then open the site and verify with an email code.
Remove A Consultant
- Log in to Cloudflare.
- Go to Zero Trust.
- Go to Access controls.
- Go to Applications.
- Open the Apply For China FAQ Hub application.
- Scroll down to Access policies.
- Click Consultants Only.
- Click Configure.
- Scroll down to Configure rules.
- Under Emails, remove the consultant's email address.
- Save the policy.
After removal, that consultant should no longer be able to open the site.
Managing Editors
Use Firebase Authentication for editor accounts.
Add Or Reset An Editor
- Log in to Firebase.
- Open the Apply For China FAQ Hub project.
- Go to Authentication.
- Go to Users.
- Add or reset the editor account.
- Set a secure password.
Do not share editor passwords in chat or email.
Editing The FAQ
- Open the FAQ Hub website.
- Open Editor sign in.
- Sign in with an approved editor email.
- Edit, add, delete, or reorder entries with the Drag handle.
- Changes are saved to Firebase and should update for everyone.
If the edit buttons or drag-and-drop are not working, the editor is probably not signed in.
Firestore Rules
The Firestore rules should allow everyone who reaches the site to read the FAQ, but only approved editors can make changes.
Use these rules in Firebase Firestore:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /faqEntries/{docId} {
allow read: if true;
allow create, update, delete: if request.auth != null
&& request.auth.token.email in [
"info@applyforchina.com",
"surbhikesh@gmail.com"
];
}
}
}
Firebase Storage Rules
Images and documents are uploaded to Firebase Storage. Everyone who can reach the site can view/download attachments, but only approved editors should be able to upload.
Use these rules in Firebase Storage:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /faq-attachments/{entryId}/{fileName} {
allow read: if true;
allow write: if request.auth != null
&& request.auth.token.email in [
"info@applyforchina.com",
"surbhikesh@gmail.com"
];
}
}
}
Updating The Website File
The current upload file is:
apply-for-china-faq-hub-cloudflare.zip
To update the website:
- Go to Cloudflare Workers & Pages.
- Open the Apply For China FAQ Hub project.
- Click New deployment.
- Upload the latest zip file.
- Wait for deployment to finish.
- Open the live site and test it.
The zip must contain a file named exactly index.html at the root level.
If The FAQ Looks Broken
Signs that the database may be broken:
- FAQ cards show no question title
- Many entries show only
CustomandFAQ - Categories look wrong
- The total entry count is right, but the content looks blank or mixed up
To reset the FAQ database:
- Go to Firebase.
- Open Firestore Database.
- Open the
faqEntriescollection. - Delete the broken documents, or delete all documents inside
faqEntries. - Go back to the FAQ Hub website.
- Sign in as an editor.
- Click Initialize database once.
- Refresh the site.
Troubleshooting
If a consultant cannot enter the site:
- Check that their email is listed in Cloudflare Access.
- Ask them to check spam or junk mail for the code.
- Ask them to use the same email that was approved.
- Ask them to try an incognito/private browser window.
If an editor cannot sign in:
- Check that Email/Password sign-in is enabled in Firebase Authentication.
- Check that the editor account exists in Firebase Authentication.
- Reset the editor password if needed.
- Make sure the email is one of the approved editor emails.
If a deployment does not load:
- Make sure the zip contains
index.html. - Make sure
index.htmlis not inside another folder. - Redeploy the latest zip file.
Recommended Admin Routine
- Add consultant emails when they start.
- Remove consultant emails when they leave.
- Keep editor access limited.
- Review the Cloudflare approved email list regularly.
- Avoid sharing one common password.
Editor sign in
Consultants can view. Editors sign in to make changes.
Add a new FAQ entry
Paste images into the writing box or attach files here. Use the width slider under each image to resize it.
Connecting to shared database...