Skip to content
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
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<br />
<a href="https://changes.page">Website</a>
·
<a href="https://github.com/techulus/changes-page/issues">Issues</a>
·
<a href="https://techulus.atlassian.net/servicedesk/customer/portal/1">Support</a>
·
<a href="SELF-HOSTING.md">Self-Hosting</a>
</p>
</p>

Expand All @@ -29,6 +29,14 @@ If you want to learn more about this project or have any questions, send us an e
- [Postmark](https://postmarkapp.com)
- [Arcjet](https://arcjet.com)

## Deployment

<a href="https://railway.com?referralCode=techulus">
<img src="https://railway.com/brand/logotype-light.png" alt="Railway" height="70" />
</a>

Try [Railway](https://railway.com?referralCode=techulus), a modern platform that makes deploying applications simple and fast. Railway provides excellent developer experience with features like automatic deployments, built-in databases, and seamless scaling.

## Getting Started 🚀

### Requirements
Expand Down
49 changes: 49 additions & 0 deletions SELF-HOSTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Self-Hosting Changes.Page

This guide will help you set up and deploy Changes.Page on your own infrastructure.

## Database Setup

You have two options for setting up the database:

### Option 1: Local Supabase (Recommended for Development)

Follow the official Supabase self-hosting guide using Docker:
https://supabase.com/docs/guides/self-hosting/docker

### Option 2: Supabase Cloud

Create a new project at [supabase.com](https://supabase.com) and use the provided connection details.

## Application Deployment

The repository includes Docker Compose files for easy deployment of the applications.

1. Ensure you have Docker and Docker Compose installed
2. Set up your environment variables in the respective `.env` files (see `.env.example` files in `apps/web` and `apps/page`)
3. Run the applications using Docker Compose:

```sh
docker-compose up -d
```

## Feature Limitations

Please note the following limitations when self-hosting:

- **Billing**: Currently only supported through Stripe integration
- **Custom Domains**: Only supported when deployed on Vercel
- **AI Features**: All AI functionality is channeled through ManagePrompt and requires their service

## Environment Configuration

Make sure to configure the following in your environment files:

- Database connection details (Supabase)
- Authentication keys
- Stripe keys (if using billing features)
- ManagePrompt API keys (if using AI features)
- Any other third-party service credentials

For detailed environment variable setup, refer to the `.env.example` files in the respective app directories.

9 changes: 9 additions & 0 deletions apps/page/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

# Inngest
INNGEST_EVENT_KEY=

# Arcjet
ARCJET_KEY=
3 changes: 1 addition & 2 deletions apps/page/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ yarn-error.log*

.env*
.flaskenv*
!.env.project
!.env.vault
!.env.example

# IDE
.idea
Expand Down
16 changes: 0 additions & 16 deletions apps/page/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
## Pages App

This folder contains the pages app which renders user changelog pages.

### Environment Variables

```
# Supabase details from https://app.supabase.io
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

# Inngest
INNGEST_EVENT_KEY=
INNGEST_SIGNING_KEY=

# Arcjet
ARCJET_KEY=
```
4 changes: 0 additions & 4 deletions apps/page/pages/_sites/[site]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,18 @@ export async function getServerSideProps({
};
}

console.time("fetchRenderData");
const { page, settings } = await fetchRenderData(site);
console.timeEnd("fetchRenderData");

if (!page || !settings || !(await isSubscriptionActive(page?.user_id))) {
return {
notFound: true,
};
}

console.time("fetchPosts");
const { posts, postsCount } = await fetchPosts(String(page?.id), {
pinned_post_id: settings?.pinned_post_id,
limit: 10,
});
console.timeEnd("fetchPosts");

return {
props: {
Expand Down
40 changes: 40 additions & 0 deletions apps/web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
NEXT_PUBLIC_PAGES_DOMAIN=http://localhost:3000

# Supabase details from https://app.supabase.io
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

# Stripe credentials from https://dashboard.stripe.com/apikeys
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRICE_ID=
EMAIL_NOTIFICATION_STRIPE_PRICE_ID=

# Custom domains
VERCEL_AUTH_TOKEN=
VERCEL_TEAM_ID=
VERCEL_PAGES_PROJECT_ID=

# Postmark Emails
POSTMARK_SERVER_KEY=
POSTMARK_WEBHOOK_KEY=

# Inngest
INNGEST_EVENT_KEY=
INNGEST_SIGNING_KEY=

# Arcjet
ARCJET_KEY=

# CMS
NEXT_PUBLIC_SANITY_PROJECT_ID=jeixxcw8

# ManagePrompt
MANAGEPROMPT_SECRET=
MANAGEPROMPT_CHANGEGPT_WORKFLOW_ID=

# PostHog
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
3 changes: 1 addition & 2 deletions apps/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ yarn-error.log*

.env*
.flaskenv*
!.env.project
!.env.vault
!.env.example

# IDE
.idea
Expand Down
42 changes: 0 additions & 42 deletions apps/web/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
## Web App

This folder contains the dashboard app for the project and all marketing pages.

### Environment Variables

```
NEXT_PUBLIC_PAGES_DOMAIN=http://localhost:3000

# Supabase details from https://app.supabase.io
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
SUPABASE_WEBHOOK_KEY=

# Stripe credentials from https://dashboard.stripe.com/apikeys
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRICE_ID=
EMAIL_NOTIFICATION_STRIPE_PRICE_ID=

# Open AI
OPENAI_API_KEY=

# Custom domains
VERCEL_AUTH_TOKEN=
VERCEL_TEAM_ID=
VERCEL_PAGES_PROJECT_ID=

# Postmark Emails
POSTMARK_SERVER_KEY=
POSTMARK_WEBHOOK_KEY=

# Inngest
INNGEST_EVENT_KEY=
INNGEST_SIGNING_KEY=

# CMS
NEXT_PUBLIC_SANITY_PROJECT_ID=

# ManagePrompt
MANAGEPROMPT_SECRET=
MANAGEPROMPT_CHANGEGPT_WORKFLOW_ID=
```
8 changes: 8 additions & 0 deletions apps/web/components/layout/footer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const navigation = {
name: "ChangeCraftAI",
href: "/free-tools/ai-changelog-generator",
},
{
name: "SemVer Calculator",
href: "/free-tools/semantic-version-calculator",
},
{
name: "Release Calendar",
href: "/free-tools/release-calendar",
},
{ name: "Blog", href: ROUTES.BLOG },
],
legal: [
Expand Down
Loading