Skip to content

Commit 9da9323

Browse files
authored
Merge pull request #1 from roberts/dev
Initial Swap UI for swamp dex
2 parents ff38d6f + ba17432 commit 9da9323

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+21733
-48
lines changed

.gitignore

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1-
/vendor/
2-
node_modules/
3-
npm-debug.log
4-
yarn-error.log
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
52

6-
# Laravel 4 specific
7-
bootstrap/compiled.php
8-
app/storage/
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
97

10-
# Laravel 5 & Lumen specific
11-
public/storage
12-
public/hot
8+
# testing
9+
/coverage
1310

14-
# Laravel 5 & Lumen specific with changed public path
15-
public_html/storage
16-
public_html/hot
11+
# next.js
12+
/.next/
13+
/out/
1714

18-
storage/*.key
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
1928
.env
20-
Homestead.yaml
21-
Homestead.json
22-
/.vagrant
23-
.phpunit.result.cache
24-
25-
/public/build
26-
/storage/pail
27-
.env.backup
28-
.env.production
29-
.phpactor.json
30-
auth.json
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore artifacts:
2+
build
3+
coverage
4+
.next

.prettierrc.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
trailingComma: 'es5',
3+
tabWidth: 2,
4+
semi: true,
5+
singleQuote: true,
6+
};

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,75 @@
1-
# dex
2-
cloned swamp dex
1+
# Template for dApp built in Next.js
2+
3+
Template for a decentralized application (dApp) built in [Next](https://nextjs.org).
4+
5+
- [TypeScript](https://www.typescriptlang.org)
6+
- [Next 15](https://nextjs.org/blog/next-15)
7+
- [TanStack Query](https://tanstack.com/query/latest)
8+
- [Sass](https://sass-lang.com)
9+
- [Tailwind CSS](https://tailwindcss.com)
10+
11+
### Web3 Packages
12+
13+
- [viem](https://viem.sh/)
14+
- [rainbowkit](https://www.rainbowkit.com)
15+
- [wagmi](https://wagmi.sh)
16+
17+
---
18+
19+
## Available Scripts
20+
21+
### Development Mode
22+
23+
#### Start the Development Server
24+
25+
These commands start the application in development mode. Open [http://localhost:3000](http://localhost:3000) in your browser to see the result. The page auto-updates as you edit the file.
26+
27+
```bash
28+
npm run dev
29+
# or
30+
yarn dev
31+
# or
32+
pnpm dev
33+
```
34+
35+
### Production Build
36+
37+
#### Build the App for Production
38+
39+
These commands build an optimized version of the application for production, saved in the `.next` folder.
40+
41+
```bash
42+
npm run build
43+
# or
44+
yarn build
45+
# or
46+
pnpm build
47+
```
48+
49+
### Production Server
50+
51+
#### Start the Production Server
52+
53+
After building the application, use these commands to start the server in production mode.
54+
55+
```bash
56+
npm run start
57+
# or
58+
yarn start
59+
# or
60+
pnpm start
61+
```
62+
63+
### Code Quality
64+
65+
#### Run the Linter
66+
67+
Run these commands to start the linter, which helps maintain code quality and find any issues.
68+
69+
```bash
70+
npm run lint
71+
# or
72+
yarn lint
73+
# or
74+
pnpm lint
75+
```

env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_WALLETCONNECT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxx

eslint.config.mjs

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import path from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
import js from "@eslint/js";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended
12+
});
13+
14+
const eslintConfig = [
15+
// File patterns e ignores
16+
{
17+
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
18+
ignores: ["node_modules/**", ".next/**", "out/**", "public/**"],
19+
languageOptions: {
20+
parserOptions: {
21+
ecmaVersion: "latest",
22+
sourceType: "module",
23+
ecmaFeatures: {
24+
jsx: true
25+
}
26+
}
27+
}
28+
},
29+
30+
// Global settings e language options
31+
...compat.extends("next/core-web-vitals"),
32+
...compat.extends("plugin:@typescript-eslint/recommended"),
33+
...compat.extends("plugin:react/recommended"),
34+
35+
// Plugin configurations
36+
{
37+
settings: {
38+
react: {
39+
version: "detect"
40+
}
41+
},
42+
rules: {
43+
// Disable unecessary rules for Next.js
44+
"react/react-in-jsx-scope": "off",
45+
"react/prop-types": "off",
46+
"import/no-anonymous-default-export": "off",
47+
"@typescript-eslint/no-unused-expressions": ["error", {
48+
"allowTernary": true,
49+
"allowShortCircuit": true
50+
}],
51+
52+
// Typescript
53+
"@typescript-eslint/no-unused-vars": "warn",
54+
"@typescript-eslint/no-explicit-any": "warn",
55+
56+
// General
57+
"no-console": ["warn", { allow: ["warn", "error"] }],
58+
"no-var": "error",
59+
"prefer-const": "warn",
60+
61+
// Restricts `./` and `../` imports to enforce consistent use of absolute imports with aliases.
62+
"no-restricted-imports": "off",
63+
64+
// Enforce import order to group imports by type and path.
65+
"import/order": ["warn", {
66+
groups: [
67+
"builtin",
68+
"external",
69+
"internal"
70+
],
71+
pathGroups: [
72+
{
73+
pattern: "react",
74+
group: "external",
75+
position: "before"
76+
},
77+
{
78+
pattern: "next/**",
79+
group: "external",
80+
position: "before"
81+
},
82+
{
83+
pattern: "@rainbow-me/**",
84+
group: "external",
85+
position: "after"
86+
},
87+
{
88+
pattern: "@/hooks/**",
89+
group: "internal",
90+
position: "after"
91+
},
92+
{
93+
pattern: "@/components/**",
94+
group: "internal",
95+
position: "after"
96+
},
97+
{
98+
pattern: "react-icons/**",
99+
group: "external",
100+
position: "after"
101+
},
102+
{
103+
pattern: "@/lib/constants/**",
104+
group: "internal",
105+
position: "after"
106+
},
107+
{
108+
pattern: "@/lib/types/**",
109+
group: "internal",
110+
position: "after"
111+
}
112+
],
113+
pathGroupsExcludedImportTypes: ["react"],
114+
"newlines-between": "never",
115+
alphabetize: {
116+
order: "asc",
117+
caseInsensitive: true
118+
}
119+
}]
120+
}
121+
}
122+
];
123+
124+
export default eslintConfig;

next.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
webpack: (config) => {
5+
config.externals.push('pino-pretty', 'lokijs', 'encoding');
6+
return config;
7+
},
8+
};
9+
10+
module.exports = nextConfig;

0 commit comments

Comments
 (0)