/they-work-for-us

Thailand's Politician Directory website

Primary LanguageJavaScript

They Work For Us

An open-source politician directory project for listing and tracking activities of members of the Cabinet and National Assembly of Thailand. It's run on Gatsby.

👓 Table of Contents

🌎 Environments

Environment Description
Staging Non-release features for internal testing
Production Public website

🍳 Development

After installing NodeJS and yarn, you can start in development mode by

yarn start

Your site is running on http://localhost:8000 and GraphQL playground on http://localhost:8000/___graphql.

📑 Sync Data

Data sources are maintained on NocoDB by contributors. We have script to fetch and transform it into YAML files, which will be consumed by Gatsby.

graph TD
    A[NocoDB] -->|yarn sync| B[src/contents/*.yaml]
    B -->|gatsby-source-filesystem| C[Gatsby's GraphQL]
    C -->|graphql query| D[React frontend]
    C --> E[GraphQL playground]
    D -->|build| F[Static site]
Loading

To sync data and append latest changes to src/contents/*.yaml, run:

yarn sync

🙋 Getting Started for Contributers

  • Issues with "help wanted" tag can be picked up, and assign yourself to the issue.
  • We ain't no ************! Feel free to suggest an idea, and use the techniques/tools you prefer.
  • The codebase is not so nice, to be honest. Feel free to ask or discuss any concern in the issue.
  • When you are done or need help, submit the PR to the repository for a review.

Thank you for your contribution and enjoy coding!

📖 Reference

Data Dictionary

Glossary

Thai English
คณะรัฐมนตรี Cabinet
พรรคการเมือง Party
วุฒิสภา The Senate
รัฐสภา National Assembly of Thailand
สภาผู้แทนราษฏร The House of Representatives
สมาชิกวุฒิสภา (ส.ว.) Senator
สมาชิกสภาผู้แทนราษฎร (ส.ส.) Member of the House of Representatives

🤝 License and Terms of Use

อ่านรายละเอียดได้ที่ ข้อตกลงในการใช้งาน (Terms of Use)