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

Astro #43

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions apps/astro/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PUBLIC_SITE_URL="http://localhost:4321"
PUBLIC_SITE_EMAIL=""

# Database
DATABASE_URL=""
DATABASE_URL_UNPOOLED=""

# PostHog
PUBLIC_POSTHOG_API_KEY=""
PUBLIC_POSTHOG_HOST=""

# Plausible
PUBLIC_PLAUSIBLE_DOMAIN=""
PUBLIC_PLAUSIBLE_HOST=""

# Beehiiv
BEEHIIV_API_KEY=""
BEEHIIV_PUBLICATION_ID=""

# Stripe
STRIPE_SECRET_KEY=""
STRIPE_WEBHOOK_SECRET=""
STRIPE_PRODUCT_IDS="prod_xxx,prod_yyy,prod_zzz"
24 changes: 24 additions & 0 deletions apps/astro/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
48 changes: 48 additions & 0 deletions apps/astro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Astro Starter Kit: Basics

```sh
npm create astro@latest -- --template basics
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── favicon.svg
├── src/
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
40 changes: 40 additions & 0 deletions apps/astro/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// @ts-check
import cloudflare from "@astrojs/cloudflare"
import react from "@astrojs/react"
import { defineConfig, envField } from "astro/config"

export default defineConfig({
devToolbar: { enabled: false },
experimental: {
responsiveImages: true,
svg: true,
},
compressHTML: true,
// adapter: cloudflare(),
env: {
schema: {
PUBLIC_SITE_URL: envField.string({ context: "client", access: "public" }),
PUBLIC_SITE_EMAIL: envField.string({ context: "client", access: "public" }),
DATABASE_URL: envField.string({ context: "server", access: "secret" }),
DATABASE_URL_UNPOOLED: envField.string({ context: "server", access: "secret" }),
PUBLIC_POSTHOG_API_KEY: envField.string({ context: "client", access: "public" }),
PUBLIC_POSTHOG_HOST: envField.string({ context: "client", access: "public" }),
PUBLIC_PLAUSIBLE_DOMAIN: envField.string({ context: "client", access: "public" }),
PUBLIC_PLAUSIBLE_HOST: envField.string({ context: "client", access: "public" }),
BEEHIIV_API_KEY: envField.string({ context: "server", access: "secret" }),
BEEHIIV_PUBLICATION_ID: envField.string({ context: "server", access: "secret" }),
STRIPE_SECRET_KEY: envField.string({ context: "server", access: "secret" }),
STRIPE_WEBHOOK_SECRET: envField.string({ context: "server", access: "secret" }),
STRIPE_PRODUCT_IDS: envField.string({ context: "server", access: "secret" }),
},
},
integrations: [react()],
vite: {
resolve: {
alias: {
".prisma/client/default": "../../node_modules/.prisma/client/default.js",
".prisma/client/edge": "../../node_modules/.prisma/client/edge.js",
}
}
}
})
36 changes: 36 additions & 0 deletions apps/astro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@openalternative/astro",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^4.1.1",
"@curiousleaf/utils": "^1.0.40",
"@number-flow/react": "^0.4.4",
"@openalternative/db": "workspace:*",
"astro": "^5.0.9",
"lucide-astro": "^0.468.0"
},
"devDependencies": {
"@astrojs/cloudflare": "^12.1.0",
"@tailwindcss/postcss": "^4.0.0-beta.7",
"@tailwindcss/typography": "^0.5.15",
"postcss": "^8",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"tailwindcss": "^4.0.0-beta.8",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.2"
},
"prettier": {
"semi": false,
"singleQuote": false,
"trailingComma": "es5",
"printWidth": 100
}
}
5 changes: 5 additions & 0 deletions apps/astro/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
plugins: {
"@tailwindcss/postcss": {},
},
}
Binary file added apps/astro/public/3d-heart.webp
Binary file not shown.
Binary file added apps/astro/public/advertisers.webp
Binary file not shown.
Binary file added apps/astro/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/astro/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/astro/public/fonts/GeistSans-Variable.woff2
Binary file not shown.
Binary file added apps/astro/public/fonts/UncutSans-Variable.woff2
Binary file not shown.
Binary file added apps/astro/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading