Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prod #646

Merged
merged 14 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,37 @@ If you have any questions or want to get in contact with the maintainers, you ca
</a>
</div>

# Branching strategy

We are using two branches that are protected:

- `prod` - This is the main branch where all the code that is in production is located.
- `master` - This is the branch where all the code that is deployed to staging is located.
- `master` should always be deployable to staging thereby also prod.
- All changes from maintainers and contributers should go toward `master`.

All other branches are dev branches that are created from `master` and merged back into `master` when the development is done.

> **_NOTE:_** Dev branches meaning short-lived branches that are created for a specific feature or bug fix. If the feature cannot be completed in a short amount of time, it is recommended to surround the feature with a feature flag and merge the branch into `master` quickly to avoid merge conflicts.

# Deployment

## Staging ([staging.momentmeal.com](https://staging.momentmeal.com/))

The staging environment is automatically deployed when changes get to the `master` branch. This is done frequently, as all development goes here. Stating is used to test the state of master, to see if we are ready to deploy to prod with new features/improvements.

## Production ([momentmeal.com](https://momentmeal.com/))

The production environment is automatically deployed when changes get to the `prod` branch. There is no strict cadence for this, but it is done when we have a set of features/improvements that are ready to be released. It will also happen, that there is a bug in production we need to address, then a `hotfix/some-name` is made toward `prod` to solve the issue, directly deploying to prod. But this should not happen often

# Development

## UI Components

Since we are making use of the [Shadcn UI](https://ui.shadcn.com/docs) library, we have a set of components that are already made for us. This means that we can focus on the business logic and not the UI. If you need a component that is not yet in the `/components/ui` folder, take a look at [Shadcn UI](https://ui.shadcn.com/docs) and see if the component is available there. Then you should be able to from the `/apps/web` directory run `pnpm dlx shadcn-ui@latest add ???` replacing `???` with the relevant component. This will automatically install add the component to the `ui` folder.

If there is not yet a component in the Shadcn UI library, this typically means the component is a domain-specific component. These should be created in the `/components` folder, ideally in a relevant subfolder.

## Feature Flags

Create the feature flag in PostHog and use the feature flag in your code.
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"langchain": "^0.0.153",
"lodash": "^4.17.21",
"lucide-react": "^0.279.0",
"next": "14.2.5",
"next": "14.2.10",
"next-contentlayer2": "^0.4.6",
"next-safe-action": "^7.4.3",
"next-themes": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/layouts/site-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Link from 'next/link';

export function SiteFooter() {
return (
<footer className="w-full border-t bg-background">
<footer className="w-full border-t bg-background pb-12">
<Shell as="div">
<section
id="footer-content"
Expand Down
Loading
Loading