Skip to content

Commit 4484583

Browse files
author
Ian Walter
committed
Adding some pages
1 parent 32fed35 commit 4484583

23 files changed

+6848
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.next
2+
node_modules
3+
.env

apps/admin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "admin"
3+
}

apps/admin/pages/_app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '../main.css'
2+
3+
function AppPage ({ Component, pageProps }) {
4+
return (
5+
<Component {...pageProps} />
6+
)
7+
}
8+
9+
export default AppPage

apps/admin/pages/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function HomePage () {
2+
return (
3+
<div>
4+
Under Construction
5+
</div>
6+
)
7+
}

apps/api/index.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import dotenv from 'dotenv'
2+
import * as whip from '@generates/whip'
3+
import accounts from '@generates/whip-accounts'
4+
import stripe from 'stripe'
5+
6+
dotenv.config()
7+
8+
const app = whip.create({
9+
logger: { level: 'debug' }
10+
})
11+
12+
app.add({
13+
plugin: accounts,
14+
opts: {
15+
email: {
16+
transport: {
17+
ignoreTLS: true,
18+
host: 'localhost',
19+
port: 25
20+
}
21+
},
22+
sessions: { secret: 'realshitnevertellalie' }
23+
}
24+
})
25+
26+
app.use(function stripeMiddleware (req, res, next) {
27+
req.stripe = stripe(process.env.STRIPE_ACCOUNT_ID)
28+
next()
29+
})
30+
31+
app.add({ plugin: accounts })
32+
33+
app.get('/', (req, res) => res.json({ name: 'api', version: '1.0.0' }))
34+
35+
app.get('/session', ...accounts.getSession)
36+
37+
app.post('/sign-up', ...accounts.signUp)
38+
39+
app.post('/sign-in', ...accounts.signIn)
40+
41+
app.delete('/sign-out', ...accounts.signOut)
42+
43+
app.post('/forgot-password', ...accounts.forgotPassword)
44+
45+
app.post('/reset-password', ...accounts.resetPassword)
46+
47+
app.put('/account', ...accounts.saveAccount)
48+
49+
export default app

apps/api/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"private": true,
3+
"name": "api",
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"start": "node server.js",
8+
"pretest": "prisma db seed",
9+
"test": "bff"
10+
},
11+
"prisma": {
12+
"seed": "node prisma/seed.js"
13+
},
14+
"dependencies": {
15+
"@generates/whip": "^0.2.4",
16+
"@generates/whip-accounts": "^0.0.9",
17+
"dotenv": "^14.1.0",
18+
"stripe": "^8.195.0"
19+
},
20+
"devDependencies": {
21+
"prisma": "^3.7.0"
22+
}
23+
}

apps/api/server.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import app from './index.js'
2+
3+
app.start()

apps/web/babel.config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["next/babel"]
3+
}

apps/web/main.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

apps/web/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"private": true,
3+
"name": "web",
4+
"version": "0.0.0",
5+
"scripts": {
6+
"dev": "next dev --port ${PORT:-8806}",
7+
"build": "next build",
8+
"start": "next start --port ${PORT:-8806}"
9+
},
10+
"dependencies": {
11+
"@generates/swag": "^1.1.0",
12+
"@generates/swag-squad": "^0.0.33",
13+
"@headlessui/react": "^1.4.3",
14+
"@stitches/react": "^1.2.7",
15+
"clsx": "^1.1.1",
16+
"next": "^12.0.7",
17+
"react": "^17.0.2",
18+
"react-dom": "^17.0.2",
19+
"react-hook-form": "^7.27.1",
20+
"react-icons": "^4.3.1",
21+
"tinybase": "^1.0.5"
22+
},
23+
"devDependencies": {
24+
"autoprefixer": "^10.4.2",
25+
"postcss": "^8.4.5",
26+
"tailwindcss": "^3.0.15"
27+
}
28+
}

0 commit comments

Comments
 (0)