This commit is contained in:
Chris Grimmett 2023-04-05 18:51:51 -08:00
commit 3c618316a5
31 changed files with 158133 additions and 0 deletions

68
.gitignore vendored Normal file
View File

@ -0,0 +1,68 @@
.11ty-vite
# it's important that .cache stay .gitignore, as
# eleventy-fetch is used to cache patreon API requests
.cache/
.editorconfig
*.key
*~
# test VOD
website/vods/3021-10-16T00\:30\:00.000Z.md
website/vods/30211015T173000Z.md
.env
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Dependency directories
node_modules/
jspm_packages/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
.env.test
.env.production
# yarn berry
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

1
.strapi-updater.json Normal file
View File

@ -0,0 +1 @@
{}

147529
.yarn/releases/yarn-1.22.19.cjs vendored Executable file

File diff suppressed because one or more lines are too long

1
.yarnrc.yml Normal file
View File

@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-1.22.19.cjs

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM node:16-alpine as build
# Installing libvips-dev for sharp Compatibility
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /opt/
COPY ./package.json ./yarn.lock ./
ENV PATH /opt/node_modules/.bin:$PATH
RUN yarn config set network-timeout 600000 -g && yarn install --production
WORKDIR /opt/app
COPY ./ .
RUN yarn build
FROM node:16-alpine
RUN apk add --no-cache vips-dev
FROM node:16-alpine
RUN apk add --no-cache vips-dev
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /opt/app
COPY --from=build /opt/node_modules ./node_modules
ENV PATH /opt/node_modules/.bin:$PATH
COPY --from=build /opt/app ./
EXPOSE 5000
CMD ["yarn", "start"]

57
README.md Normal file
View File

@ -0,0 +1,57 @@
# 🚀 Getting started with Strapi
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds.
### `develop`
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop)
```
npm run develop
# or
yarn develop
```
### `start`
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start)
```
npm run start
# or
yarn start
```
### `build`
Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build)
```
npm run build
# or
yarn build
```
## ⚙️ Deployment
Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html).
## 📚 Learn more
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community.
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
## ✨ Community
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
---
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>

13
config/admin.js Normal file
View File

@ -0,0 +1,13 @@
module.exports = ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET'),
},
apiToken: {
salt: env('API_TOKEN_SALT'),
},
transfer: {
token: {
salt: env('TRANSFER_TOKEN_SALT'),
},
},
});

7
config/api.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
rest: {
defaultLimit: 25,
maxLimit: 100,
withCount: true,
},
};

49
config/database.js Normal file
View File

@ -0,0 +1,49 @@
const path = require('path');
module.exports = ({ env }) => {
const client = env('DATABASE_CLIENT', 'postgres');
const connections = {
postgres: {
connection: {
connectionString: env('DATABASE_URL'),
host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'strapi'),
user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'),
ssl: env.bool('DATABASE_SSL', false) && {
key: env('DATABASE_SSL_KEY', undefined),
cert: env('DATABASE_SSL_CERT', undefined),
ca: env('DATABASE_SSL_CA', undefined),
capath: env('DATABASE_SSL_CAPATH', undefined),
cipher: env('DATABASE_SSL_CIPHER', undefined),
rejectUnauthorized: env.bool(
'DATABASE_SSL_REJECT_UNAUTHORIZED',
true
),
},
schema: env('DATABASE_SCHEMA', 'public'),
},
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
},
sqlite: {
connection: {
filename: path.join(
__dirname,
'..',
env('DATABASE_FILENAME', 'data.db')
),
},
useNullAsDefault: true,
},
};
return {
connection: {
client,
...connections[client],
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000),
},
};
};

26
config/middlewares.js Normal file
View File

@ -0,0 +1,26 @@
module.exports = [
'strapi::errors',
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:'],
'img-src': ["'self'", 'data:', 'blob:', 'dl.airtable.com', 'res.cloudinary.com'],
'media-src': ["'self'", 'data:', 'blob:', 'dl.airtable.com', 'res.cloudinary.com'],
upgradeInsecureRequests: null,
},
},
},
},
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];

17
config/plugins.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = ({ env }) => ({
upload: {
config: {
provider: 'cloudinary',
providerOptions: {
cloud_name: env('CLOUDINARY_NAME'),
api_key: env('CLOUDINARY_KEY'),
api_secret: env('CLOUDINARY_SECRET'),
},
actionOptions: {
upload: {},
uploadStream: {},
delete: {},
},
}
}
});

14
config/server.js Normal file
View File

@ -0,0 +1,14 @@
// greets some
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
proxy: true,
app: {
keys: env.array('APP_KEYS'),
},
webhooks: {
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
},
url: env('', 'https://boost3.sbtp.xyz')
});

View File

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

34
package.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "sakuraboost3",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"dev": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-i18n": "4.9.0",
"@strapi/plugin-users-permissions": "4.9.0",
"@strapi/provider-upload-cloudinary": "^4.9.0",
"@strapi/strapi": "4.9.0",
"@strapi/utils": "^4.9.0",
"better-sqlite3": "8.0.1",
"pg": "^8.10.0",
"strapi-plugin-mux-video-uploader": "^2.6.0"
},
"author": {
"name": "CJ_Clippy"
},
"strapi": {
"uuid": false
},
"engines": {
"node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0"
},
"license": "MIT",
"packageManager": "yarn@1.22.19"
}

3
public/robots.txt Normal file
View File

@ -0,0 +1,3 @@
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
# User-Agent: *
# Disallow: /

0
public/uploads/.gitkeep Normal file
View File

39
src/admin/app.example.js Normal file
View File

@ -0,0 +1,39 @@
const config = {
locales: [
// 'ar',
// 'fr',
// 'cs',
// 'de',
// 'dk',
// 'es',
// 'he',
// 'id',
// 'it',
// 'ja',
// 'ko',
// 'ms',
// 'nl',
// 'no',
// 'pl',
// 'pt-BR',
// 'pt',
// 'ru',
// 'sk',
// 'sv',
// 'th',
// 'tr',
// 'uk',
// 'vi',
// 'zh-Hans',
// 'zh',
],
};
const bootstrap = (app) => {
console.log(app);
};
export default {
config,
bootstrap,
};

View File

@ -0,0 +1,9 @@
'use strict';
/* eslint-disable no-unused-vars */
module.exports = (config, webpack) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
// Important: return the modified config
return config;
};

0
src/api/.gitkeep Normal file
View File

View File

@ -0,0 +1,42 @@
{
"kind": "collectionType",
"collectionName": "cards",
"info": {
"singularName": "card",
"pluralName": "cards",
"displayName": "Card",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"SKU": {
"type": "string"
},
"image_front": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
},
"image_back": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
},
"quantity": {
"type": "integer"
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* card controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::card.card');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* card router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::card.card');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* card service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::card.card');

View File

@ -0,0 +1,40 @@
{
"kind": "collectionType",
"collectionName": "offers",
"info": {
"singularName": "offer",
"pluralName": "offers",
"displayName": "Offer",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"card": {
"type": "relation",
"relation": "oneToOne",
"target": "api::card.card"
},
"price_cents": {
"type": "integer"
},
"uid": {
"type": "uid"
},
"status": {
"type": "enumeration",
"enum": [
"available",
"bought",
"unwanted"
]
},
"owner": {
"type": "relation",
"relation": "oneToOne",
"target": "plugin::users-permissions.user"
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* offer controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::offer.offer');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* offer router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::offer.offer');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* offer service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::offer.offer');

0
src/extensions/.gitkeep Normal file
View File

20
src/index.js Normal file
View File

@ -0,0 +1,20 @@
'use strict';
module.exports = {
/**
* An asynchronous register function that runs before
* your application is initialized.
*
* This gives you an opportunity to extend code.
*/
register(/*{ strapi }*/) {},
/**
* An asynchronous bootstrap function that runs before
* your application gets started.
*
* This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic.
*/
bootstrap(/*{ strapi }*/) {},
};

10085
yarn.lock Normal file

File diff suppressed because it is too large Load Diff