-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
317 changed files
with
1,063 additions
and
30,719 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "prettier"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const path = require("path"); | ||
|
||
const buildEslintCommand = (filenames) => | ||
`next lint --fix --file ${filenames | ||
.map((f) => path.relative(process.cwd(), f)) | ||
.join(" --file ")}`; | ||
|
||
module.exports = { | ||
"*.{js,jsx,ts,tsx}": [buildEslintCommand], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.prettierignore | ||
public/ | ||
.gitignore | ||
.husky/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"arrowParens:": "always", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"printWidth": 80, | ||
"proseWrap": "always", | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
FROM ubuntu:22.04 as build | ||
|
||
MAINTAINER SDF Ops Team <[email protected]> | ||
LABEL maintainer="SDF Ops Team <[email protected]>" | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
# https://create-react-app.dev/docs/advanced-configuration/ | ||
ENV INLINE_RUNTIME_CHUNK=false | ||
RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \ | ||
curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \ | ||
echo "deb https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ | ||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \ | ||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | ||
apt-get update && apt-get install -y nodejs yarn && apt-get clean | ||
|
||
|
||
COPY . /app/ | ||
RUN yarn git-info | ||
RUN yarn install | ||
|
||
RUN yarn build | ||
|
||
FROM nginx:1.17 | ||
|
||
COPY --from=build /app/build/ /usr/share/nginx/html/ | ||
|
||
# We're removing /laboratory/ prefix. To allow for transition | ||
# period we'll support /laboratory/ links using rewrites | ||
COPY nginx_default.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,36 @@ | ||
# laboratory | ||
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). | ||
|
||
The Stellar Laboratory is a suite of tools to help one learn about exploring the | ||
Stellar network. See it in action: | ||
[https://laboratory.stellar.org/](https://laboratory.stellar.org/). | ||
## Getting Started | ||
|
||
## Developing | ||
|
||
```sh | ||
yarn start | ||
``` | ||
|
||
Testing hardware wallets requires an HTTPS connection to enable U2F. The | ||
recommended way to do this is with [`ngrok`](https://ngrok.com/). Once | ||
downloaded and authenticated, start ngrok, and tell the laboratory to start with | ||
a public URL. | ||
First, run the development server: | ||
|
||
```bash | ||
./ngrok http 3000 | ||
# in a separate terminal | ||
# the subdomain will appear in ngrok's output | ||
yarn start --public randomsubdomain.ngrok.io | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
## Building for production | ||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
```sh | ||
yarn build | ||
``` | ||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
To build a production docker image using a clean docker build environment: | ||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
```sh | ||
make docker-build | ||
# or directly with docker | ||
docker build -t lab:localbuild . | ||
``` | ||
## Learn More | ||
|
||
To build and run production build locally: | ||
To learn more about Next.js, take a look at the following resources: | ||
|
||
```sh | ||
yarn production | ||
# or | ||
yarn prod:build | ||
yarn prod:serve | ||
``` | ||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
Production uses Amplitude to emit metrics, so to fully emulate a production build, you'll need to set an `AMPLITUDE_API_KEY` variable in `/public/settings/env-config.js` file. | ||
## Deploy on Vercel | ||
|
||
## Internal documentation | ||
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. | ||
|
||
The [docs.md](./docs.md) file contains code documentation on the laboratory. The | ||
docs.md is only relevant for developing the laboratory. | ||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.