Skip to content

Commit

Permalink
migrate app to remix
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkulpinski committed Mar 27, 2024
1 parent f271ebd commit 28d9fad
Show file tree
Hide file tree
Showing 146 changed files with 3,812 additions and 2,479 deletions.
23 changes: 14 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
SITE_URL="http://localhost:4000"
SITE_URL="http://localhost:5173"

# Graphql
GRAPHQL_ENDPOINT=""
GRAPHQL_TOKEN=""
DATABASE_URL="postgresql://root@localhost/openalternative"
DIRECT_URL="postgresql://root@localhost/openalternative"

# ScreenshotOne
SCREENSHOTONE_ACCESS_KEY=""
SCREENSHOTONE_SECRET_KEY=""

# PostHog
NEXT_PUBLIC_POSTHOG_KEY=""
NEXT_PUBLIC_POSTHOG_HOST=""

# Google Analytics
NEXT_PUBLIC_GA_KEY=""
POSTHOG_API_KEY=""
POSTHOG_API_HOST=""

# MailerLite
MAILERLITE_API_TOKEN=""

# GitHub Token
GITHUB_TOKEN=""

# Amazon S3
S3_REGION=""
S3_BUCKET=""
S3_ACCESS_KEY=""
S3_SECRET_ACCESS_KEY=""
83 changes: 83 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* This is intended to be a basic starting point for linting in your app.
* It relies on recommended configs out of the box for simplicity, but you can
* and should modify this configuration to best suit your team's needs.
*/

/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
commonjs: true,
es6: true,
},

// Base config
extends: ["eslint:recommended"],

overrides: [
// React
{
files: ["**/*.{js,jsx,ts,tsx}"],
plugins: ["react", "jsx-a11y"],
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
],
settings: {
react: {
version: "detect",
},
formComponents: ["Form"],
linkComponents: [
{ name: "Link", linkAttribute: "to" },
{ name: "NavLink", linkAttribute: "to" },
],
"import/resolver": {
typescript: {},
},
},
},

// Typescript
{
files: ["**/*.{ts,tsx}"],
plugins: ["@typescript-eslint", "import"],
parser: "@typescript-eslint/parser",
settings: {
"import/internal-regex": "^~/",
"import/resolver": {
node: {
extensions: [".ts", ".tsx"],
},
typescript: {
alwaysTryTypes: true,
},
},
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
],
},

// Node
{
files: [".eslintrc.cjs"],
env: {
node: true,
},
},
],
}
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

43 changes: 10 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
node_modules

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# next-sitemap
/public/robots*
/public/sitemap*

# production
/.cache
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env

# Local env files
.env
Expand All @@ -39,9 +14,11 @@ yarn-error.log*
# vercel
.vercel

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

# typescript
*.tsbuildinfo
next-env.d.ts
# macOS-specific files
.DS_Store
9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

10 changes: 0 additions & 10 deletions .zed/tasks.json

This file was deleted.

67 changes: 30 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![OpenAlternative](https://openalternative.co/screen.png)
![OpenAlternative](https://openalternative.co/opengraph.png)

<p align="center" style="margin-top: 20px">
<p align="center">
Expand All @@ -22,6 +22,11 @@
</a>
</p>

<p align="center">
<a href="https://www.producthunt.com/posts/openalternative?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-openalternative" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=443404&theme=light&period=daily" alt="OpenAlternative - Discover open source alternatives to popular software | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
<a href="https://www.producthunt.com/posts/openalternative?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-openalternative" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=443404&theme=light" alt="OpenAlternative - Discover open source alternatives to popular software | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
</p>

## About this project

OpenAlternative is a community driven list of open source alternatives to proprietary software and applications.
Expand All @@ -30,54 +35,42 @@ Our goal is to be your first stop when researching for a new open source service

Join us in creating the biggest directory of open source software.

## Recognition
## Development

<p align="center">
<a href="https://www.producthunt.com/posts/openalternative?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-openalternative" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=443404&theme=light&period=daily" alt="OpenAlternative - Discover open source alternatives to popular software | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
<a href="https://www.producthunt.com/posts/openalternative?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-openalternative" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=443404&theme=light" alt="OpenAlternative - Discover open source alternatives to popular software | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
</p>
OpenAlternative is currently written in [Remix](https://remix.run). Please refer to the [Remix documentation](https://docs.remix.run) for more information.

## Airtable
## 🧞 Commands

The project is built on top of [Airtable](https://airtable.com) database. This allows me to quickly make changes and make use of the vast amount of extensions that Airtable has to offer.
All commands are run from the root of the project, from a terminal:

In order to build your own version of this project, you will need to create your own Airtable base and fill in the environment variables with the appropriate values.
| Command | Action |
| :-------------- | :------------------------------------------- |
| `bun install` | Installs dependencies |
| `bun run dev` | Starts local dev server at `localhost:5173` |
| `bun run build` | Build your production site to `./build/` |
| `bun run start` | Preview your build locally, before deploying |

Easiest way to start is to duplicate the base I have created:
## Deployment

```
https://airtable.com/appBvWPZiYx4MPh6J/shrSwSYHdS3H7W2wL
```

## Getting Started

First, run the development server:
First, build your app for production:

```sh
bun run build
```
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.
Then run the app in production mode:

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/\*. Files in this directory are treated as API routes instead of React pages.
```sh
bun start
```

This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Now you'll need to pick a host to deploy it to.

## Learn More
### DIY

To learn more about Next.js, take a look at the following resources:
If you're familiar with deploying Node applications, the built-in Remix app server is production-ready.

- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
Make sure to deploy the output of `bun run build`

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
- `build/server`
- `build/client`
31 changes: 0 additions & 31 deletions actions/subscribe.ts

This file was deleted.

Loading

0 comments on commit 28d9fad

Please sign in to comment.