Skip to content

Commit 1c4ae63

Browse files
Merge pull request #2 from LAION-AI/next-js-website
Migrate website portion to Next.js
2 parents 6aec36a + 288d64d commit 1c4ae63

17 files changed

+4026
-27747
lines changed

website/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

website/.gitignore

+17-4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,29 @@
88
# testing
99
/coverage
1010

11+
# next.js
12+
/.next/
13+
/out/
14+
1115
# production
1216
/build
1317

1418
# misc
1519
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20+
*.pem
2021

22+
# debug
2123
npm-debug.log*
2224
yarn-debug.log*
2325
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

website/README.md

+24-51
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,43 @@
1-
# Getting Started with Create React App
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
## Required Environment Variables
44

5-
## Available Scripts
5+
This requires:
66

7-
In the project directory, you can run:
7+
- `NEXT_PUBLIC_SUPABASE_URL`: A supabase Authorization URL
8+
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`: A public supabase key for Authorization
89

9-
### `npm start`
10+
These can both be optained from the Supabase project settings page.
1011

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
12+
## Getting Started
1313

14-
The page will reload when you make changes.\
15-
You may also see any lint errors in the console.
14+
First, run the development server:
1615

17-
### `npm test`
16+
```bash
17+
npm run dev
18+
# or
19+
yarn dev
20+
```
1821

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
22+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
2123

22-
### `npm run build`
24+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
2325

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
2627

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
29-
30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31-
32-
### `npm run eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
35-
36-
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39-
40-
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
28+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
4129

4230
## Learn More
4331

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
47-
48-
### Code Splitting
49-
50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51-
52-
### Analyzing the Bundle Size
53-
54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55-
56-
### Making a Progressive Web App
57-
58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59-
60-
### Advanced Configuration
32+
To learn more about Next.js, take a look at the following resources:
6133

62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
34+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
35+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
6336

64-
### Deployment
37+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
6538

66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
39+
## Deploy on Vercel
6740

68-
### `npm run build` fails to minify
41+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
6942

70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
43+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

website/next.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
};
5+
6+
module.exports = nextConfig;

0 commit comments

Comments
 (0)