news-catalyst / next-tinynewsdemo

Frontend for Tiny News Collective organizations
https://next-tinynewsdemo.vercel.app
1 stars 0 forks source link

Updated new organization onboarding / bootstrap #1215

Closed jacqui closed 2 years ago

jacqui commented 2 years ago

Some new stuff that will hopefully make adding a new org to the platform a bit easier.

Closes #1033

  1. The bootstrap script works again - it had to be updated for the current version of the platform. This is step one of the process.
  2. There is now an admin section in the TinyCMS - it requires you to be authenticated with a newscatalyst.org or tinynewsco.org email address. Currently there are only two pages: a list of orgs (with subdomains) and a form to configure each org's values in the settings table. Previously you'd have to edit this directly in Hasura and/or write a script to do it.
  3. The howto Google Doc is updated with the latest instructions plus additional context on the tech setup: https://docs.google.com/document/d/1sSvtRTYkk2PoixMrWPT3FSM6qO_5zseqdCXv4LmP7Rc/edit#

New bootstrap command:

node script/bootstrap -n "Full Org Name" -s short-org-slug -u https://org-url.tinynewsco.dev -b org-subdomain -c org-customDomain.org

node script/bootstrap -n "April News 6" -s april-news-6 -u https://april-news-6.tinynewsco.dev -b april-news-6 -c aprilnews6.org

I ran the above command, then started my dev server locally, and I was able to follow the instructions outlined in the Google Doc.

The tinycms admin section works by ignoring the subdomain (I kept it on next-tinynewsdemo.localhost) and instead using the subdomain param (context.params.subdomain) to lookup and update records in Hasura.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
staging-tiny-news-sites ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 9:57PM (UTC)
9 Ignored Deployments | Name | Status | Preview | Updated | | :--- | :----- | :------ | :------ | | **ang-diaryo** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/ang-diaryo/8JQnV6qoNXw4937sbvNmNnEHhMMf)) | | Apr 21, 2022 at 9:57PM (UTC) | | **austin-vida** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/austin-vida/4y9TEtexkCBWPoMkLPWMEibVErrD)) | | Apr 21, 2022 at 9:57PM (UTC) | | **black-by-god** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/black-by-god/DVmczhYoPdsXMTGJcKeGhhJqQgXk)) | | Apr 21, 2022 at 9:57PM (UTC) | | **five-wards-media** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/five-wards-media/HBF2kLZFFBPLhd6U186bwtUYbvNC)) | | Apr 21, 2022 at 9:57PM (UTC) | | **harvey-world-herald** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/harvey-world-herald/H2yeq7via8HzrV9PzYdVX8tbFFWX)) | | Apr 21, 2022 at 9:57PM (UTC) | | **next-tinynewsdemo** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/next-tinynewsdemo/GM3WpWVSRRocz6mzST7HSGf75BUY)) | | Apr 21, 2022 at 9:57PM (UTC) | | **spotlight-schools** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/spotlight-schools/53KmXcPBmspjzoXca7BR1pL4RksR)) | | Apr 21, 2022 at 9:57PM (UTC) | | **tiny-news-curriculum** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-curriculum/GHLt8neVJFwEpeqTjEEKJtZ6Qf9X)) | | Apr 21, 2022 at 9:57PM (UTC) | | **tiny-news-sites** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-sites/EvgNXPbzWtJ6vK7nVQWbuaJroZF4)) | | Apr 21, 2022 at 9:57PM (UTC) |
TylerFisher commented 2 years ago
❯ node script/bootstrap -n "Test New Bootstrap" -s test-new-bootstrap -u https://bootstrap.tinynewsco.dev -b bootstrap -c bootstraptnc.com

Creating organization in the database and env...
/Users/tylerfisher/src/next-tinynewsdemo/node_modules/googleapis/node_modules/googleapis-common/build/src/apirequest.js:116
        throw new Error('Missing required parameters: ' + missingParams.join(', '));
              ^

Error: Missing required parameters: accountId
    at createAPIRequestAsync (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/googleapis/node_modules/googleapis-common/build/src/apirequest.js:116:15)
    at Object.createAPIRequest (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/googleapis/node_modules/googleapis-common/build/src/apirequest.js:52:16)
    at Resource$Management$Webproperties.insert (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/googleapis/build/src/apis/analytics/v3.js:2519:44)
    at setupGoogleAnalytics (/Users/tylerfisher/src/next-tinynewsdemo/script/bootstrap.js:244:59)
    at createOrganization (/Users/tylerfisher/src/next-tinynewsdemo/script/bootstrap.js:375:38)
    at /Users/tylerfisher/src/next-tinynewsdemo/script/bootstrap.js:631:13
    at Command.<anonymous> (/Users/tylerfisher/src/next-tinynewsdemo/script/bootstrap.js:633:7)
    at Command.listener [as _actionHandler] (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/commander/index.js:922:31)
    at Command._parseCommand (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/commander/index.js:1503:14)
    at Command.parse (/Users/tylerfisher/src/next-tinynewsdemo/node_modules/commander/index.js:1292:10)