Skip to content

Commit

Permalink
Merge pull request #25 from massalabs/front
Browse files Browse the repository at this point in the history
Front init
  • Loading branch information
Ben-Rey authored Jul 17, 2024
2 parents 07398df + 8452525 commit e4066be
Show file tree
Hide file tree
Showing 51 changed files with 9,963 additions and 0 deletions.
4 changes: 4 additions & 0 deletions massa-tips/app/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# buildnet config:
VITE_IS_MAINNET=false
VITE_SC_ADDRESS=AS14oUcMujECzburUs8iMZZGsJQQQ61MxPVUKyV8WUNrw3mHmSqF
VITE_OP_FEES=4 # value in nMAS
6 changes: 6 additions & 0 deletions massa-tips/app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
.eslintcache
8 changes: 8 additions & 0 deletions massa-tips/app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: ['@massalabs', 'plugin:react-hooks/recommended'],
plugins: ['html', 'import'],
rules: {
'no-console': 'off',
camelcase: 'warn',
},
};
30 changes: 30 additions & 0 deletions massa-tips/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.DS_Store

# build output
build/
.env
2 changes: 2 additions & 0 deletions massa-tips/app/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd ./app
cd src && npx lint-staged
4 changes: 4 additions & 0 deletions massa-tips/app/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,ts,jsx,tsx,json,cjs,css,html}": ["npm run prettier:fix"],
"*.{js,ts,jsx,tsx,json,cjs,html}": ["npm run lint:fix"]
}
10 changes: 10 additions & 0 deletions massa-tips/app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
.DS_Store
dist
public
*.local
.eslintcache
*.md
*.mdx
package-lock.json
.github
23 changes: 23 additions & 0 deletions massa-tips/app/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
...require('@massalabs/prettier-config-as'),
overrides: [
{
files: '*.json',
options: {
parser: 'json',
},
},
{
files: '*.html',
options: {
parser: 'html',
},
},
{
files: '*.css',
options: {
parser: 'css',
},
},
],
};
25 changes: 25 additions & 0 deletions massa-tips/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Massa Autonomous Tips Front

## Dev guide

Install dependencies:

npm install

Create `.env` file:

cp .env.example .env

Run dev server:

npm run dev

then navigate to <http://localhost:5173>.

Build app:

npm run build

Format code and lint:

npm run fmt
13 changes: 13 additions & 0 deletions massa-tips/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Massa Tips</title>
</head>
<body class="bg-secondary">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit e4066be

Please sign in to comment.