π¦ Start
ποΈ Folder Structureβ
caution
We have a monorepo structure. Run all commands (espeically anything to do with installing) from root directory otherwise dependencies will get in a mess.
rentreef # root directory of your site
βββ package.json # npm workspaces
βββ package-lock.json # the only one
βββ π node_modules # root level
βββ π functions # firebase functions
βββ π www # next.js & storybook
β βββ TailwindUIExΒ amples # TailwindUI
β βββ π node_modules # www level
β βββ π src
β βββ π components # React components
β βββ π pages # Next pages
β βββ π stories # storybook
β
βββ π app-docs # documentation
βββ docs # main folder for docs
βββ docusaurus.config.js # config
βββ π node_modules # app-docs level
NPM Workspacesβ
Workspaces is a generic term that refers to the set of features in the npm cli that provides support to managing multiple packages from your local files system from within a singular top-level, root package.
npm install --workspace=app-docs # run a command in app-docs
npm install -w=app-docs # run a command in app-docs
Get startedβ
Environment fileβ
cd www
touch env.local
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_DATABASE_URL=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=
Install Dependenciesβ
# within `root` rentreef directory
npm install
This will create a
node_modulesfolder in the root of rentreef, in thewwwfolder andapp-docsfolder. It will only create onepackage-lock.jsonin the root rentreef folder.
Next.js dev serverβ
# within `www` directory or `root` directory
npm run dev
Storybook dev serverβ
# within `www` directory or `root` directory
npm run sb
Docusaurus dev serverβ
# within `app-docs` directory or `root` directory
npm run start