Browse Source

init

master
marius 2 years ago
parent
commit
b27e05a97d
  1. 114
      .gitignore
  2. 3
      README.md
  3. 16
      backend/.editorconfig
  4. 3
      backend/.env.example
  5. 3
      backend/.eslintignore
  6. 27
      backend/.eslintrc
  7. 114
      backend/.gitignore
  8. 57
      backend/README.md
  9. 8
      backend/config/admin.js
  10. 7
      backend/config/api.js
  11. 11
      backend/config/database.js
  12. 12
      backend/config/middlewares.js
  13. 25
      backend/config/plugins.js
  14. 7
      backend/config/server.js
  15. BIN
      backend/data/data.db
  16. 9
      backend/data/data.js
  17. 131
      backend/data/en/global.json
  18. 7
      backend/data/en/index.js
  19. 352
      backend/data/en/pages.json
  20. 131
      backend/data/fr/global.json
  21. 7
      backend/data/fr/index.js
  22. 352
      backend/data/fr/pages.json
  23. 19
      backend/data/lead-form-submissions.json
  24. 1
      backend/data/uploads/devices.svg
  25. BIN
      backend/data/uploads/favicon.png
  26. BIN
      backend/data/uploads/logo.png
  27. 1
      backend/data/uploads/palette.svg
  28. 1
      backend/data/uploads/preview.svg
  29. BIN
      backend/data/uploads/undraw-content-team.png
  30. 1
      backend/data/uploads/undraw-content-team.svg
  31. 1
      backend/data/uploads/undraw-create-page.svg
  32. 1
      backend/data/uploads/undraw-design-page.svg
  33. BIN
      backend/data/uploads/user.png
  34. 0
      backend/database/migrations/.gitkeep
  35. BIN
      backend/favicon.ico
  36. 26314
      backend/package-lock.json
  37. 34
      backend/package.json
  38. 3
      backend/public/robots.txt
  39. 0
      backend/public/uploads/.gitkeep
  40. BIN
      backend/public/uploads/Logo_Website_26554c3d74.png
  41. BIN
      backend/public/uploads/Logo_Website_858d929b24.png
  42. BIN
      backend/public/uploads/Logo_Website_dcf80b85ab.png
  43. BIN
      backend/public/uploads/Screenshot_20220301_151137_ed085fe924.png
  44. BIN
      backend/public/uploads/Screenshot_20220301_153205_078dd74ae1.png
  45. BIN
      backend/public/uploads/Unbenannt_a83460efa8.PNG
  46. BIN
      backend/public/uploads/bme280_2020_70640e35f8.PNG
  47. BIN
      backend/public/uploads/favicon_fd3ac26a54.png
  48. BIN
      backend/public/uploads/large_Unbenannt_a83460efa8.PNG
  49. BIN
      backend/public/uploads/medium_Screenshot_20220301_151137_ed085fe924.png
  50. BIN
      backend/public/uploads/medium_Screenshot_20220301_153205_078dd74ae1.png
  51. BIN
      backend/public/uploads/medium_Unbenannt_a83460efa8.PNG
  52. BIN
      backend/public/uploads/medium_bme280_2020_70640e35f8.PNG
  53. BIN
      backend/public/uploads/small_Screenshot_20220301_151137_ed085fe924.png
  54. BIN
      backend/public/uploads/small_Screenshot_20220301_153205_078dd74ae1.png
  55. BIN
      backend/public/uploads/small_Unbenannt_a83460efa8.PNG
  56. BIN
      backend/public/uploads/small_bme280_2020_70640e35f8.PNG
  57. BIN
      backend/public/uploads/thumbnail_Screenshot_20220301_151137_ed085fe924.png
  58. BIN
      backend/public/uploads/thumbnail_Screenshot_20220301_153205_078dd74ae1.png
  59. BIN
      backend/public/uploads/thumbnail_Unbenannt_a83460efa8.PNG
  60. BIN
      backend/public/uploads/thumbnail_bme280_2020_70640e35f8.PNG
  61. 35
      backend/src/admin/app.example.js
  62. 9
      backend/src/admin/webpack.config.example.js
  63. 0
      backend/src/api/.gitkeep
  64. 47
      backend/src/api/event/content-types/event/schema.json
  65. 9
      backend/src/api/event/controllers/event.js
  66. 578
      backend/src/api/event/documentation/1.0.0/event.json
  67. 9
      backend/src/api/event/routes/event.js
  68. 9
      backend/src/api/event/services/event.js
  69. 83
      backend/src/api/global/content-types/global/schema.json
  70. 9
      backend/src/api/global/controllers/global.js
  71. 384
      backend/src/api/global/documentation/1.0.0/global.json
  72. 9
      backend/src/api/global/routes/global.js
  73. 9
      backend/src/api/global/services/global.js
  74. 31
      backend/src/api/lead-form-submission/content-types/lead-form-submission/schema.json
  75. 9
      backend/src/api/lead-form-submission/controllers/lead-form-submission.js
  76. 486
      backend/src/api/lead-form-submission/documentation/1.0.0/lead-form-submission.json
  77. 9
      backend/src/api/lead-form-submission/routes/lead-form-submission.js
  78. 9
      backend/src/api/lead-form-submission/services/lead-form-submission.js
  79. 69
      backend/src/api/page/content-types/page/schema.json
  80. 9
      backend/src/api/page/controllers/page.js
  81. 578
      backend/src/api/page/documentation/1.0.0/page.json
  82. 9
      backend/src/api/page/routes/page.js
  83. 9
      backend/src/api/page/services/page.js
  84. 230
      backend/src/bootstrap.js
  85. 27
      backend/src/components/elements/feature-column.json
  86. 33
      backend/src/components/elements/feature-row.json
  87. 14
      backend/src/components/elements/feature.json
  88. 19
      backend/src/components/elements/footer-section.json
  89. 22
      backend/src/components/elements/logos.json
  90. 23
      backend/src/components/elements/notification-banner.json
  91. 31
      backend/src/components/elements/plan.json
  92. 39
      backend/src/components/elements/testimonial.json
  93. 27
      backend/src/components/layout/footer.json
  94. 30
      backend/src/components/layout/navbar.json
  95. 29
      backend/src/components/links/button-link.json
  96. 22
      backend/src/components/links/button.json
  97. 24
      backend/src/components/links/link.json
  98. 40
      backend/src/components/meta/metadata.json
  99. 19
      backend/src/components/sections/bottom-actions.json
  100. 16
      backend/src/components/sections/feature-columns-group.json
  101. Some files were not shown because too many files have changed in this diff Show More

114
.gitignore vendored

@ -0,0 +1,114 @@
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
.tmp
*.log
*.sql
*.sqlite
*.sqlite3
############################
# Misc.
############################
*#
ssl
.idea
nbproject
public/uploads/*
!public/uploads/.gitkeep
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
############################
# Tests
############################
testApp
coverage
############################
# Strapi
############################
.env
license.txt
exports
*.cache
build
.strapi-updater.json

3
README.md

@ -1,3 +0,0 @@
# strapi_cms
strapi mit next.js

16
backend/.editorconfig

@ -0,0 +1,16 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,*.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false

3
backend/.env.example

@ -0,0 +1,3 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=

3
backend/.eslintignore

@ -0,0 +1,3 @@
.cache
build
**/node_modules/**

27
backend/.eslintrc

@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"es6": true,
"node": true,
"browser": false
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": false
},
"sourceType": "module"
},
"globals": {
"strapi": true
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-console": 0,
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}

114
backend/.gitignore vendored

@ -0,0 +1,114 @@
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
.tmp
*.log
*.sql
*.sqlite
*.sqlite3
############################
# Misc.
############################
*#
ssl
.idea
nbproject
#public/uploads/*
!public/uploads/.gitkeep
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
############################
# Tests
############################
testApp
coverage
############################
# Strapi
############################
.env
license.txt
exports
*.cache
build
.strapi-updater.json

57
backend/README.md

@ -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>

8
backend/config/admin.js

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

7
backend/config/api.js

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

11
backend/config/database.js

@ -0,0 +1,11 @@
const path = require('path');
module.exports = ({ env }) => ({
connection: {
client: 'sqlite',
connection: {
filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')),
},
useNullAsDefault: true,
},
});

12
backend/config/middlewares.js

@ -0,0 +1,12 @@
module.exports = [
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];

25
backend/config/plugins.js

@ -0,0 +1,25 @@
module.exports = {
// ...
// deepl: {
// enabled: true,
// config: {
// // your DeepL API key
// apiKey: 'key',
// // whether to use the free or paid api, default true
// freeApi: true,
// // Which field types are translated (default string, text, richtext, components and dynamiczones)
// translatedFieldTypes: [
// 'string',
// 'text',
// 'richtext',
// 'component',
// 'dynamiczone',
// ],
// // If relations should be translated (default true)
// translateRelations: true,
// // You can define a custom glossary to be used here (see https://www.deepl.com/docs-api/managing-glossaries/)
// // glossaryId: 'customGlossary',
// },
// },
// ...
}

7
backend/config/server.js

@ -0,0 +1,7 @@
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});

BIN
backend/data/data.db

Binary file not shown.

9
backend/data/data.js

@ -0,0 +1,9 @@
const { global, pages } = require("./en");
const { globalFR, pagesFR } = require("./fr");
const { leadFormSubmissions } = require("./lead-form-submissions.json");
module.exports = {
globals: [global, globalFR],
pages: [...pages, ...pagesFR],
leadFormSubmissions,
};

131
backend/data/en/global.json

@ -0,0 +1,131 @@
{
"global": {
"id": 1,
"locale": "en",
"metaTitleSuffix": "Strapi Corporate",
"metadata": {
"id": 1,
"metaTitle": "Strapi starter for Corporate Sites",
"metaDescription": "Build your corporate site with Strapi",
"twitterCardType": "summary",
"twitterUsername": "strapijs",
"shareImage": null
},
"notificationBanner": {
"id": 1,
"text": "This page was built using the Strapi starter for Corporate Sites.\n[View other Strapi starters](https://strapi.io/starters)",
"type": "info"
},
"navbar": {
"id": 1,
"links": [
{
"id": 1,
"url": "/pricing",
"newTab": false,
"text": "Pricing"
},
{
"id": 3,
"url": "/contact",
"newTab": false,
"text": "Contact"
}
],
"button": {
"id": 13,
"url": "#",
"newTab": false,
"text": "Sign up",
"type": "secondary"
},
"logo" : null
},
"footer": {
"id": 1,
"smallText": "© Copyright My Company™",
"columns": [
{
"id": 1,
"title": "Product",
"links": [
{
"id": 11,
"url": "#",
"newTab": false,
"text": "Features"
},
{
"id": 13,
"url": "#",
"newTab": false,
"text": "Sign up"
}
]
},
{
"id": 2,
"title": "Legal",
"links": [
{
"id": 15,
"url": "#",
"newTab": false,
"text": "Privacy policy"
},
{
"id": 16,
"url": "#",
"newTab": false,
"text": "Terms & conditions"
}
]
},
{
"id": 5,
"title": "Company",
"links": [
{
"id": 18,
"url": "#",
"newTab": false,
"text": "Careers"
},
{
"id": 21,
"url": "#",
"newTab": false,
"text": "Team"
}
]
},
{
"id": 7,
"title": "Social",
"links": [
{
"id": 24,
"url": "#",
"newTab": false,
"text": "Twitter"
},
{
"id": 25,
"url": "#",
"newTab": false,
"text": "LinkedIn"
}
]
}
],
"logo": null
},
"favicon": null,
"localizations": [
{
"id": 2,
"locale": "fr"
}
]
}
}

7
backend/data/en/index.js

@ -0,0 +1,7 @@
const { global } = require("./global.json");
const { pages } = require("./pages.json");
module.exports = {
global,
pages
}

352
backend/data/en/pages.json

@ -0,0 +1,352 @@
{
"pages": [
{
"id": 1,
"slug": "",
"locale": "en",
"localizations": [
{
"id": 5,
"locale": "fr"
}
],
"shortName": "Home",
"publishedAt": "2021-10-22T08:11:55.490Z",
"metadata": {
"id": 2,
"metaTitle": "Strapi corporate site starter",
"metaDescription": "Build a fully editable site with Strapi",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 1,
"__component": "sections.hero",
"title": "The best way to build your Corporate Site",
"label": "New Strapi starter",
"description": "Get started with your Strapi business website in seconds.",
"smallTextWithLink": "Want to build your own from scratch? Tutorial coming soon",
"buttons": [
{
"id": 2,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "Get started",
"type": "primary"
},
{
"id": 4,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": true,
"text": "See the code",
"type": "secondary"
}
],
"picture": null
},
{
"id": 1,
"__component": "sections.feature-rows-group",
"features": [
{
"id": 1,
"title": "Let marketing teams build their pages",
"description": "Thanks to a pre-built list of UI sections, marketers can design exactly the pages they want.",
"link": {
"id": 7,
"url": "#",
"newTab": false,
"text": "View the list of UI sections"
},
"media": null
},
{
"id": 2,
"title": "Leave your developers alone",
"description": "You can publish, edit and delete pages without help from developers. Your technical team can finally focus on their tasks.",
"link": {
"id": 8,
"url": "#",
"newTab": false,
"text": "View how to create a page"
},
"media": null
}
]
},
{
"id": 1,
"__component": "sections.feature-columns-group",
"features": [
{
"id": 1,
"title": "Preview your changes",
"description": "Thanks to an integrated Preview Mode, you can visualize your pages before publishing them.",
"icon": null
},
{
"id": 2,
"title": "Fully responsive",
"description": "This starter works well on all screens, whether it's mobile, tablet or desktop.",
"icon": null
},
{
"id": 3,
"title": "Easy to customize",
"description": "We use Tailwind for styling. You can change your site's theme without digging through the code.",
"icon": null
}
]
},
{
"id": 1,
"__component": "sections.testimonials-group",
"title": "Your customer testimonials here",
"description": "This section is where you can showcase your customers. Insert quotes, and show the logos of companies who like your product",
"link": {
"id": 2,
"url": "#",
"newTab": false,
"text": "All testimonials"
},
"logos": [
{
"id": 1,
"title": "Strapi",
"logo": null
},
{
"id": 2,
"title": "Strapi 2",
"logo": null
},
{
"id": 3,
"title": "Strapi 3",
"logo": null
}
],
"testimonials": [
{
"id": 1,
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
"authorName": "Your Customer Name",
"authorTitle": "A happy customer",
"link": "#",
"logo": null,
"picture": null
}
]
},
{
"id": 1,
"__component": "sections.lead-form",
"title": "Subscribe To Our Newsletter",
"emailPlaceholder": "email@company.com",
"submitButton": {
"id": 1,
"__component": "links.button",
"text": "Subscribe",
"type": "primary"
},
"location": "Home Page Bottom"
},
{
"id": 2,
"__component": "sections.bottom-actions",
"title": "Start building your website",
"buttons": [
{
"id": 7,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "Get started",
"type": "primary"
},
{
"id": 8,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "See the code",
"type": "secondary"
}
]
}
]
},
{
"id": 2,
"slug": "pricing",
"locale": "en",
"localizations": [
{
"id": 6,
"locale": "fr"
}
],
"shortName": "Pricing",
"publishedAt": "2021-10-22T08:11:55.490Z",
"metadata": {
"id": 3,
"metaTitle": "Pricing",
"metaDescription": "The different plans",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 1,
"__component": "sections.pricing",
"title": "Clear pricing table",
"plans": [
{
"id": 1,
"name": "Hobby",
"description": "Perfect for side projects",
"isRecommended": null,
"price": 0,
"pricePeriod": "forever",
"features": [
{
"id": 1,
"name": "A cool feature"
},
{
"id": 2,
"name": "Another cool feature"
},
{
"id": 3,
"name": "Some other cool feature"
}
]
},
{
"id": 2,
"name": "Premium",
"description": "A more advanced plan for SMBs",
"isRecommended": true,
"price": 20,
"pricePeriod": "per month",
"features": [
{
"id": 4,
"name": "The coolest feature"
},
{
"id": 5,
"name": "Nice feature"
},
{
"id": 6,
"name": "Fun feature"
}
]
},
{
"id": 3,
"name": "Enterprise",
"description": "For large companies needs",
"isRecommended": null,
"price": 299,
"pricePeriod": "per month",
"features": [
{
"id": 7,
"name": "Amazing feature"
},
{
"id": 8,
"name": "Wow effect feature"
},
{
"id": 9,
"name": "Mesmerizing feature"
}
]
}
]
}
]
},
{
"id": 3,
"slug": "secret",
"locale": "en",
"localizations": [
{
"id": 7,
"locale": "fr"
}
],
"shortName": "Secret",
"metadata": {
"id": 7,
"metaTitle": "Secret page",
"metaDescription": "Preview-only page",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 2,
"__component": "sections.rich-text",
"content": "## Secret page\n\nYou can only view this page in Preview Mode."
}
]
},
{
"id": 4,
"slug": "contact",
"locale": "en",
"localizations": [
{
"id": 8,
"locale": "fr"
}
],
"shortName": "Contact",
"publishedAt": "2021-10-22T08:11:55.490Z",
"metadata": {
"id": 4,
"metaTitle": "Contact",
"metaDescription": "Get in touch with our team",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 1,
"__component": "sections.rich-text",
"content": "# Get in touch\n\n> This is an example of a page that relies almost entirely on the RichText section. It's useful for blog articles, or content-heavy pages like legal terms.\n\nWe'd love to hear from you.\n\n## Social media\n\n* [Twitter](#)\n* [Twitter](#)\n* [Twitter](#)\n\n## Postal address\n\n404 Headless Street\n__92210__ **Saint Cloud**, *France*\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
},
{
"id": 1,
"__component": "sections.bottom-actions",
"title": "Get in touch",
"buttons": [
{
"id": 1,
"url": "#",
"newTab": false,
"text": "Send an email",
"type": "primary"
},
{
"id": 3,
"url": "#",
"newTab": false,
"text": "DM us on Twitter",
"type": "secondary"
}
]
}
]
}
]
}

131
backend/data/fr/global.json

@ -0,0 +1,131 @@
{
"globalFR": {
"id": 2,
"locale": "fr",
"metaTitleSuffix": "Strapi Corporate",
"metadata": {
"id": 5,
"metaTitle": "Strapi starter for Corporate Sites",
"metaDescription": "Créer votre site corporate avec Strapi",
"twitterCardType": "summary",
"twitterUsername": "strapijs",
"shareImage": null
},
"notificationBanner": {
"id": 2,
"text": "Cette page a été crée avec le Strapi starter pour les sites Corporate.\n [Voir les autres starters Strapi](https://strapi.io/starters)",
"type": "info"
},
"navbar": {
"id": 2,
"links": [
{
"id": 4,
"url": "/pricing",
"newTab": false,
"text": "tarifs"
},
{
"id": 5,
"url": "/contact",
"newTab": false,
"text": "nous contacter"
}
],
"button": {
"id": 14,
"url": "#",
"newTab": false,
"text": "S'inscrire",
"type": "secondary"
},
"logo" : null
},
"footer": {
"id": 2,
"smallText": "© Copyright Mon Entreprise™",
"columns": [
{
"id": 3,
"title": "Produit",
"links": [
{
"id": 12,
"url": "#",
"newTab": false,
"text": "Fonctionnalités"
},
{
"id": 14,
"url": "#",
"newTab": false,
"text": "S'inscrire"
}
]
},
{
"id": 4,
"title": "Légal",
"links": [
{
"id": 17,
"url": "#",
"newTab": false,
"text": "Confidentialité"
},
{
"id": 19,
"url": "#",
"newTab": false,
"text": "Mentions légales"
}
]
},
{
"id": 6,
"title": "Entreprise",
"links": [
{
"id": 20,
"url": "#",
"newTab": false,
"text": "Nous rejoindre"
},
{
"id": 22,
"url": "#",
"newTab": false,
"text": "L'équipe"
}
]
},
{
"id": 8,
"title": "Réseaux sociaux",
"links": [
{
"id": 23,
"url": "#",
"newTab": false,
"text": "Twitter"
},
{
"id": 26,
"url": "#",
"newTab": false,
"text": "LinkedIn"
}
]
}
],
"logo": null
},
"favicon": null,
"localizations": [
{
"id": 1,
"locale": "en"
}
]
}
}

7
backend/data/fr/index.js

@ -0,0 +1,7 @@
const { globalFR } = require("./global.json");
const { pagesFR } = require("./pages.json");
module.exports = {
globalFR,
pagesFR
}

352
backend/data/fr/pages.json

@ -0,0 +1,352 @@
{
"pagesFR": [
{
"id": 5,
"slug": "",
"locale": "fr",
"localizations": [
{
"id": 1,
"locale": "en"
}
],
"shortName": "Home",
"publishedAt":"2021-10-22T08:11:55.490Z",
"metadata": {
"id": 6,
"metaTitle": "Strapi corporate site starter",
"metaDescription": "Construire un site modifiable avec Strapi",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 2,
"__component": "sections.hero",
"title": "La meilleure façon de faire votre site Corporate",
"label": "Nouveau starter Strapi",
"description": "Commencer vite avec votre site corporate",
"smallTextWithLink": "Vous voulez construire votre propre starter? Guide à venir",
"buttons": [
{
"id": 5,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "Commencer",
"type": "primary"
},
{
"id": 6,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": true,
"text": "Voir le code",
"type": "secondary"
}
],
"picture": null
},
{
"id": 2,
"__component": "sections.feature-rows-group",
"features": [
{
"id": 3,
"title": "Les équipes marketing peuvent maintenant faire leurs propres pages",
"description": "Grace à une liste pré-construite de blocs UI, les équipes marketing peuvent faire la mise en page exactement comme elles veulent",
"link": {
"id": 9,
"url": "#",
"newTab": false,
"text": "Voir la liste de blocs UI"
},
"media": null
},
{
"id": 4,
"title": "Laissez vos développeurs tranquilles",
"description": "Vous pouvez publier, modifier, et supprimer des pages sans l'aide d'un développeur. Votre équipe technique peut enfin se concentrer sur d'autre tâches.",
"link": {
"id": 10,
"url": "#",
"newTab": false,
"text": "Voir comment créer une page"
},
"media": null
}
]
},
{
"id": 2,
"__component": "sections.feature-columns-group",
"features": [
{
"id": 4,
"title": "Visualisez vos changments",
"description": "Grace à un mode preview, vous pouvez voir vos pages avant de les publier.",
"icon": null
},
{
"id": 5,
"title": "100% responsive",
"description": "Ce starter marche sur toutes les tailles d'écrans.",
"icon": null
},
{
"id": 6,
"title": "Facile à personnaliser",
"description": "On utilise Tailwind pour les styles. Vous pouvez changez le thème de votre site sans avoir besoin d'aller dans le code.",
"icon": null
}
]
},
{
"id": 2,
"__component": "sections.testimonials-group",
"title": "Ici, les témoignages des vos clients.",
"description": "Dans cette partie, vous pouvez mettre en avant vos clients. Mettez des citations, et montrez les logos des entreprises qui aiment votre produit.",
"link": {
"id": 6,
"url": "#",
"newTab": false,
"text": "All testimonials"
},
"logos": [
{
"id": 4,
"title": "Strapi",
"logo": null
},
{
"id": 5,
"title": "Strapi 2",
"logo": null
},
{
"id": 6,
"title": "Strapi 3",
"logo": null
}
],
"testimonials": [
{
"id": 2,
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
"authorName": "Nom d'un(e) Client(e) ici",
"authorTitle": "Un(e) Client(e) Satisfait(e)",
"link": "#",
"logo": null,
"picture": null
}
]
},
{
"id": 2,
"__component": "sections.lead-form",
"title": "S'inscrire à notre Newsletter",
"emailPlaceholder": "email@company.com",
"submitButton": {
"id": 2,
"__component": "links.button",
"text": "S'inscrire",
"type": "primary"
},
"location": "Home Page Bottom"
},
{
"id": 3,
"__component": "sections.bottom-actions",
"title": "Start building your website",
"buttons": [
{
"id": 10,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "Commencer",
"type": "primary"
},
{
"id": 12,
"url": "https://github.com/strapi/strapi-template-corporate",
"newTab": false,
"text": "Voir le code",
"type": "secondary"
}
]
}
]
},
{
"id": 6,
"slug": "pricing",
"locale": "fr",
"localizations": [
{
"id": 2,
"locale": "en"
}
],
"shortName": "Pricing",
"publishedAt":"2021-10-22T08:11:55.490Z",
"metadata": {
"id": 8,
"metaTitle": "Pricing",
"metaDescription": "Les différentes offres",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 2,
"__component": "sections.pricing",
"title": "Tableau de tarifs",
"plans": [
{
"id": 4,
"name": "Hobby",
"description": "Parfait pour des projets personnels",
"isRecommended": null,
"price": 0,
"pricePeriod": "toujours",
"features": [
{
"id": 10,
"name": "Voilà une feature"
},
{
"id": 11,
"name": "Une autre"
},
{
"id": 12,
"name": "Encore une autre"
}
]
},
{
"id": 5,
"name": "Premium",
"description": "Un plan plus avancé",
"isRecommended": true,
"price": 20,
"pricePeriod": "par mois",
"features": [
{
"id": 13,
"name": "Fonctionnalité 1"
},
{
"id": 14,
"name": "Fonctionnalité 2"
},
{
"id": 15,
"name": "Fonctionnalité 3"
}
]
},
{
"id": 6,
"name": "Entreprise",
"description": "Pour les besoin des grands entreprises",
"isRecommended": null,
"price": 299,
"pricePeriod": "par mois",
"features": [
{
"id": 16,
"name": "Fonctionnalité 1"
},
{
"id": 17,
"name": "Fonctionnalité 2"
},
{
"id": 18,
"name": "Fonctionnalité 3"
}
]
}
]
}
]
},
{
"id": 7,
"slug": "secret",
"locale": "fr",
"localizations": [
{
"id": 3,
"locale": "en"
}
],
"shortName": "Secret",
"metadata": {
"id": 9,
"metaTitle": "Page secrète",
"metaDescription": "Preview-only page",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 3,
"__component": "sections.rich-text",
"content": "## Page secrète. \n\n Vous seul pouvez voir cette page en Preview Mode"
}
]
},
{
"id": 8,
"slug": "contact",
"locale": "fr",
"localizations": [
{
"id": 4,
"locale": "en"
}
],
"shortName": "Contact",
"publishedAt":"2021-10-22T08:11:55.490Z",
"metadata": {
"id": 10,
"metaTitle": "Nous Contacter",
"metaDescription": "Contactez notre équipe",
"twitterCardType": "summary",
"twitterUsername": null,
"shareImage": null
},
"contentSections": [
{
"id": 4,
"__component": "sections.rich-text",
"content": "# Contactez nous\n\n> Ceci est un exemple d'une page qui repose presque entièrement sur le composant RichText. Vous pouvez l'utiliser pour des articles de blog, ou pour des pages comportant beaucoup de texte, comme par exemple les conditions d'utilisation.\n\nNous aimerions beaucoup avoir vos retours.\n\n## Social media\n\n* [Twitter](#)\n* [Twitter](#)\n* [Twitter](#)\n\n## Postal address\n\n404 Headless Street\n__92210__ **Saint Cloud**, *France*\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
},
{
"id": 4,
"__component": "sections.bottom-actions",
"title": "Get in touch",
"buttons": [
{
"id": 9,
"url": "#",
"newTab": false,
"text": "Envoyer un mail",
"type": "primary"
},
{
"id": 11,
"url": "#",
"newTab": false,
"text": "DM nous sur Twitter",
"type": "secondary"
}
]
}
]
}
]
}

19
backend/data/lead-form-submissions.json

@ -0,0 +1,19 @@
{
"leadFormSubmissions": [
{
"email": "johne@thebeatles.com",
"status": "seen",
"location": "Home Page Bottom"
},
{
"email": "paul@thebeatles.com",
"status": "contacted",
"location": "Home Page Bottom"
},
{
"email": "george@thebeatles.com",
"status": "ignored",
"location": "Home Page Bottom"
}
]
}

1
backend/data/uploads/devices.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M18 10h4v7h-4z" opacity=".3"/><path d="M23 8h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7zM4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6z"/></svg>

After

Width:  |  Height:  |  Size: 320 B

BIN
backend/data/uploads/favicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
backend/data/uploads/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

1
backend/data/uploads/palette.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 10 6.5 10s1.5.67 1.5 1.5S7.33 13 6.5 13zm3-4C8.67 9 8 8.33 8 7.5S8.67 6 9.5 6s1.5.67 1.5 1.5S10.33 9 9.5 9zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9zm4.5 2.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5z" opacity=".3"/><path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.21-.64-1.67-.08-.09-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9zm4 13h-1.77c-1.38 0-2.5 1.12-2.5 2.5 0 .61.22 1.19.63 1.65.06.07.14.19.14.35 0 .28-.22.5-.5.5-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.14 8 7c0 2.21-1.79 4-4 4z"/><circle cx="6.5" cy="11.5" r="1.5"/><circle cx="9.5" cy="7.5" r="1.5"/><circle cx="14.5" cy="7.5" r="1.5"/><circle cx="17.5" cy="11.5" r="1.5"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
backend/data/uploads/preview.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"><g><rect fill="none" height="24" width="24"/><path d="M19,19H5V7h14V19z M12,10.5c1.84,0,3.48,0.96,4.34,2.5c-0.86,1.54-2.5,2.5-4.34,2.5S8.52,14.54,7.66,13 C8.52,11.46,10.16,10.5,12,10.5 M12,9c-2.73,0-5.06,1.66-6,4c0.94,2.34,3.27,4,6,4s5.06-1.66,6-4C17.06,10.66,14.73,9,12,9L12,9z M12,14.5c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S12.83,14.5,12,14.5z" opacity=".3"/><path d="M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.11,3,19,3z M19,19H5V7h14V19z M12,10.5 c1.84,0,3.48,0.96,4.34,2.5c-0.86,1.54-2.5,2.5-4.34,2.5S8.52,14.54,7.66,13C8.52,11.46,10.16,10.5,12,10.5 M12,9 c-2.73,0-5.06,1.66-6,4c0.94,2.34,3.27,4,6,4s5.06-1.66,6-4C17.06,10.66,14.73,9,12,9L12,9z M12,14.5c-0.83,0-1.5-0.67-1.5-1.5 s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S12.83,14.5,12,14.5z"/></g></svg>

After

Width:  |  Height:  |  Size: 922 B

BIN
backend/data/uploads/undraw-content-team.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

1
backend/data/uploads/undraw-content-team.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

1
backend/data/uploads/undraw-create-page.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

1
backend/data/uploads/undraw-design-page.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

BIN
backend/data/uploads/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

0
backend/database/migrations/.gitkeep

BIN
backend/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

26314
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

34
backend/package.json

@ -0,0 +1,34 @@
{
"dependencies": {
"@strapi/plugin-documentation": "^4.1.12",
"@strapi/plugin-graphql": "^4.0.0",
"@strapi/plugin-i18n": "4.1.12",
"@strapi/plugin-users-permissions": "4.1.12",
"@strapi/strapi": "4.1.12",
"better-sqlite3": "7.4.6",
"lodash.set": "^4.3.2"
},
"name": "backend",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "36c6619b-e6d8-43ca-a55e-5e9be3365e25",
"template": "@strapi/template-corporate@^1.0.0",
"starter": "@strapi/starter-next-corporate"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}

3
backend/public/robots.txt

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

0
backend/public/uploads/.gitkeep

BIN
backend/public/uploads/Logo_Website_26554c3d74.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
backend/public/uploads/Logo_Website_858d929b24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
backend/public/uploads/Logo_Website_dcf80b85ab.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
backend/public/uploads/Screenshot_20220301_151137_ed085fe924.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
backend/public/uploads/Screenshot_20220301_153205_078dd74ae1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
backend/public/uploads/Unbenannt_a83460efa8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
backend/public/uploads/bme280_2020_70640e35f8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
backend/public/uploads/favicon_fd3ac26a54.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
backend/public/uploads/large_Unbenannt_a83460efa8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
backend/public/uploads/medium_Screenshot_20220301_151137_ed085fe924.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
backend/public/uploads/medium_Screenshot_20220301_153205_078dd74ae1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
backend/public/uploads/medium_Unbenannt_a83460efa8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
backend/public/uploads/medium_bme280_2020_70640e35f8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
backend/public/uploads/small_Screenshot_20220301_151137_ed085fe924.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
backend/public/uploads/small_Screenshot_20220301_153205_078dd74ae1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
backend/public/uploads/small_Unbenannt_a83460efa8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
backend/public/uploads/small_bme280_2020_70640e35f8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
backend/public/uploads/thumbnail_Screenshot_20220301_151137_ed085fe924.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
backend/public/uploads/thumbnail_Screenshot_20220301_153205_078dd74ae1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
backend/public/uploads/thumbnail_Unbenannt_a83460efa8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
backend/public/uploads/thumbnail_bme280_2020_70640e35f8.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

35
backend/src/admin/app.example.js

@ -0,0 +1,35 @@
export default {
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',
],
},
bootstrap(app) {
console.log(app);
},
};

9
backend/src/admin/webpack.config.example.js

@ -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
backend/src/api/.gitkeep

47
backend/src/api/event/content-types/event/schema.json

@ -0,0 +1,47 @@
{
"kind": "collectionType",
"collectionName": "events",
"info": {
"singularName": "event",
"pluralName": "events",
"displayName": "Event",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string"
},
"start": {
"type": "datetime"
},
"endDate": {
"type": "datetime"
},
"contend": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "richtext"
},
"user": {
"type": "relation",
"relation": "oneToOne",
"target": "plugin::users-permissions.user"
}
}
}

9
backend/src/api/event/controllers/event.js

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

578
backend/src/api/event/documentation/1.0.0/event.json

@ -0,0 +1,578 @@
{
"/events": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventListResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [
{
"name": "sort",
"in": "query",
"description": "Sort by attributes ascending (asc) or descending (desc)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pagination[page]",
"in": "query",
"description": "Page number (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[pageSize]",
"in": "query",
"description": "Page size (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[start]",
"in": "query",
"description": "Offset value (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[limit]",
"in": "query",
"description": "Number of entities to return (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "fields",
"in": "query",
"description": "Fields to return (ex: title,author)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "populate",
"in": "query",
"description": "Relations to return",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/events"
},
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [],
"operationId": "post/events",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventRequest"
}
}
}
}
}
},
"/events/{id}": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "get/events/{id}"
},
"put": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "put/events/{id}",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventRequest"
}
}
}
}
},
"delete": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "delete/events/{id}"
}
},
"/events/{id}/localizations": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventLocalizationResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Event"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "post/events/{id}/localizations",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventLocalizationRequest"
}
}
}
}
}
}
}

9
backend/src/api/event/routes/event.js

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

9
backend/src/api/event/services/event.js

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

83
backend/src/api/global/content-types/global/schema.json

@ -0,0 +1,83 @@
{
"kind": "singleType",
"collectionName": "globals",
"info": {
"singularName": "global",
"pluralName": "globals",
"displayName": "Global",
"name": "global"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"metadata": {
"type": "component",
"repeatable": false,
"component": "meta.metadata",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"metaTitleSuffix": {
"type": "string",
"required": true,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"favicon": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"notificationBanner": {
"type": "component",
"repeatable": false,
"component": "elements.notification-banner",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"navbar": {
"type": "component",
"repeatable": false,
"component": "layout.navbar",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"footer": {
"type": "component",
"repeatable": false,
"component": "layout.footer",
"pluginOptions": {
"i18n": {
"localized": true
}
}
}
}
}

9
backend/src/api/global/controllers/global.js

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

384
backend/src/api/global/documentation/1.0.0/global.json

@ -0,0 +1,384 @@
{
"/global": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GlobalListResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Global"
],
"parameters": [
{
"name": "sort",
"in": "query",
"description": "Sort by attributes ascending (asc) or descending (desc)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pagination[page]",
"in": "query",
"description": "Page number (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[pageSize]",
"in": "query",
"description": "Page size (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[start]",
"in": "query",
"description": "Offset value (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[limit]",
"in": "query",
"description": "Number of entities to return (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "fields",
"in": "query",
"description": "Fields to return (ex: title,author)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "populate",
"in": "query",
"description": "Relations to return",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/global"
},
"put": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GlobalResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Global"
],
"parameters": [],
"operationId": "put/global",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GlobalRequest"
}
}
}
}
},
"delete": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Global"
],
"parameters": [],
"operationId": "delete/global"
}
},
"/global/localizations": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GlobalLocalizationResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Global"
],
"parameters": [],
"operationId": "post/global/localizations",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GlobalLocalizationRequest"
}
}
}
}
}
}
}

9
backend/src/api/global/routes/global.js

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

9
backend/src/api/global/services/global.js

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

31
backend/src/api/lead-form-submission/content-types/lead-form-submission/schema.json

@ -0,0 +1,31 @@
{
"kind": "collectionType",
"collectionName": "lead_form_submissions",
"info": {
"singularName": "lead-form-submission",
"pluralName": "lead-form-submissions",
"displayName": "Lead form submission",
"name": "lead-form-submission"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"attributes": {
"email": {
"type": "string"
},
"status": {
"type": "enumeration",
"enum": [
"seen",
"contacted",
"ignored"
]
},
"location": {
"type": "string"
}
}
}

9
backend/src/api/lead-form-submission/controllers/lead-form-submission.js

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

486
backend/src/api/lead-form-submission/documentation/1.0.0/lead-form-submission.json

@ -0,0 +1,486 @@
{
"/lead-form-submissions": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionListResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Lead-form-submission"
],
"parameters": [
{
"name": "sort",
"in": "query",
"description": "Sort by attributes ascending (asc) or descending (desc)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pagination[page]",
"in": "query",
"description": "Page number (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[pageSize]",
"in": "query",
"description": "Page size (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[start]",
"in": "query",
"description": "Offset value (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[limit]",
"in": "query",
"description": "Number of entities to return (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "fields",
"in": "query",
"description": "Fields to return (ex: title,author)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "populate",
"in": "query",
"description": "Relations to return",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/lead-form-submissions"
},
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Lead-form-submission"
],
"parameters": [],
"operationId": "post/lead-form-submissions",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionRequest"
}
}
}
}
}
},
"/lead-form-submissions/{id}": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Lead-form-submission"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "get/lead-form-submissions/{id}"
},
"put": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Lead-form-submission"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "put/lead-form-submissions/{id}",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeadFormSubmissionRequest"
}
}
}
}
},
"delete": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Lead-form-submission"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "delete/lead-form-submissions/{id}"
}
}
}

9
backend/src/api/lead-form-submission/routes/lead-form-submission.js

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

9
backend/src/api/lead-form-submission/services/lead-form-submission.js

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

69
backend/src/api/page/content-types/page/schema.json

@ -0,0 +1,69 @@
{
"kind": "collectionType",
"collectionName": "pages",
"info": {
"singularName": "page",
"pluralName": "pages",
"displayName": "Page",
"name": "page"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"shortName": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"metadata": {
"type": "component",
"repeatable": false,
"component": "meta.metadata",
"required": true,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"contentSections": {
"type": "dynamiczone",
"components": [
"sections.hero",
"sections.bottom-actions",
"sections.feature-columns-group",
"sections.feature-rows-group",
"sections.testimonials-group",
"sections.large-video",
"sections.rich-text",
"sections.pricing",
"sections.lead-form"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"slug": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "string",
"regex": "^$|^[a-zA-Z/-]+$"
}
}
}

9
backend/src/api/page/controllers/page.js

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

578
backend/src/api/page/documentation/1.0.0/page.json

@ -0,0 +1,578 @@
{
"/pages": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageListResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [
{
"name": "sort",
"in": "query",
"description": "Sort by attributes ascending (asc) or descending (desc)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pagination[page]",
"in": "query",
"description": "Page number (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[pageSize]",
"in": "query",
"description": "Page size (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[start]",
"in": "query",
"description": "Offset value (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[limit]",
"in": "query",
"description": "Number of entities to return (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "fields",
"in": "query",
"description": "Fields to return (ex: title,author)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "populate",
"in": "query",
"description": "Relations to return",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/pages"
},
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [],
"operationId": "post/pages",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageRequest"
}
}
}
}
}
},
"/pages/{id}": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "get/pages/{id}"
},
"put": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "put/pages/{id}",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageRequest"
}
}
}
}
},
"delete": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "delete/pages/{id}"
}
},
"/pages/{id}/localizations": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageLocalizationResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Page"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"deprecated": false,
"required": true,
"schema": {
"type": "string"
}
}
],
"operationId": "post/pages/{id}/localizations",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageLocalizationRequest"
}
}
}
}
}
}
}

9
backend/src/api/page/routes/page.js

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

9
backend/src/api/page/services/page.js

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

230
backend/src/bootstrap.js vendored

@ -0,0 +1,230 @@
const fs = require("fs");
const { pages, globals, leadFormSubmissions } = require("../data/data");
const set = require("lodash.set");
async function isFirstRun() {
const pluginStore = strapi.store({
environment: strapi.config.environment,
type: "type",
name: "setup",
});
const initHasRun = await pluginStore.get({ key: "initHasRun" });
await pluginStore.set({ key: "initHasRun", value: true });
return !initHasRun;
}
async function setPublicPermissions(newPermissions) {
// Find the ID of the public role
const publicRole = await strapi
.query("plugin::users-permissions.role")
.findOne({
where: {
type: "public",
},
});
// Create the new permissions and link them to the public role
const allPermissionsToCreate = [];
Object.keys(newPermissions).map(controller => {
const actions = newPermissions[controller];
const permissionsToCreate = actions.map(action => {
return strapi.query("plugin::users-permissions.permission").create({
data: {
action: `api::${controller}.${controller}.${action}`,
role: publicRole.id,
},
});
});
allPermissionsToCreate.push(...permissionsToCreate);
});
await Promise.all(allPermissionsToCreate);
}
function getFileSizeInBytes(filePath) {
const stats = fs.statSync(filePath);
const fileSizeInBytes = stats["size"];
return fileSizeInBytes;
}
function getFileData(fileName) {
const filePath = `./data/uploads/${fileName}`;
// Parse the file metadata
const size = getFileSizeInBytes(filePath);
const ext = fileName.split(".").pop();
const mimeType = `image/${ext === "svg" ? "svg+xml" : ext}`;
return {
path: filePath,
name: fileName,
size,
type: mimeType,
};
}
// Create an entry and attach files if there are any
async function createEntry(model, entry, files) {
try {
if (files) {
for (const [key, file] of Object.entries(files)) {
// Get file name without the extension
const [fileName] = file.name.split('.');
// Upload each individual file
const uploadedFile = await strapi
.plugin("upload")
.service("upload")
.upload({
files: file,
data: {
fileInfo: {
alternativeText: fileName,
caption: fileName,
name: fileName,
},
},
});
// Attach each file to its entry
set(entry, key, uploadedFile[0].id);
}
}
// Actually create the entry in Strapi
const createdEntry = await strapi.entityService.create(
`api::${model}.${model}`,
{
data: entry,
}
);
} catch (e) {
console.log(e);
}
}
async function importPages(pages) {
const getPageCover = (slug) => {
switch (slug) {
case "":
return getFileData("undraw-content-team.png");
default:
return null;
}
};
return pages.map(async (page) => {
const files = {};
const shareImage = getPageCover(page.slug);
if (shareImage) {
files["metadata.shareImage"] = shareImage;
}
// Check if dynamic zone has attached files
page.contentSections.forEach((section, index) => {
if (section.__component === "sections.hero") {
files[`contentSections.${index}.picture`] = getFileData(
"undraw-content-team.svg"
);
} else if (section.__component === "sections.feature-rows-group") {
const getFeatureMedia = (featureIndex) => {
switch (featureIndex) {
case 0:
return getFileData("undraw-design-page.svg");
case 1:
return getFileData("undraw-create-page.svg");
default:
return null;
}
};
section.features.forEach((feature, featureIndex) => {
files[`contentSections.${index}.features.${featureIndex}.media`] =
getFeatureMedia(featureIndex);
});
} else if (section.__component === "sections.feature-columns-group") {
const getFeatureMedia = (featureIndex) => {
switch (featureIndex) {
case 0:
return getFileData("preview.svg");
case 1:
return getFileData("devices.svg");
case 2:
return getFileData("palette.svg");
default:
return null;
}
};
section.features.forEach((feature, featureIndex) => {
files[`contentSections.${index}.features.${featureIndex}.icon`] =
getFeatureMedia(featureIndex);
});
} else if (section.__component === "sections.testimonials-group") {
section.logos.forEach((logo, logoIndex) => {
files[`contentSections.${index}.logos.${logoIndex}.logo`] =
getFileData("logo.png");
});
section.testimonials.forEach((testimonial, testimonialIndex) => {
files[
`contentSections.${index}.testimonials.${testimonialIndex}.logo`
] = getFileData("logo.png");
files[
`contentSections.${index}.testimonials.${testimonialIndex}.picture`
] = getFileData("user.png");
});
}
});
await createEntry("page", page, files);
});
}
async function importGlobal() {
// Add images
const files = {
favicon: getFileData("favicon.png"),
"metadata.shareImage": getFileData("undraw-content-team.png"),
"navbar.logo": getFileData("logo.png"),
"footer.logo": getFileData("logo.png"),
};
// Create entry
globals.forEach(async (locale) => {
await createEntry("global", locale, files);
});
}
async function importLeadFormSubmissionData() {
leadFormSubmissions.forEach(async (submission) => {
await createEntry("lead-form-submissions", submission);
});
}
async function importSeedData() {
// Allow read of application content types
await setPublicPermissions({
global: ["find"],
page: ["find", "findOne"],
"lead-form-submission": ["create"],
});
await strapi.query("plugin::i18n.locale").create({
data: {
name: "French (fr)",
code: "fr",
},
});
// Create all entries
await importGlobal();
await importPages(pages);
await importLeadFormSubmissionData();
}
module.exports = async () => {
const shouldImportSeedData = await isFirstRun();
if (shouldImportSeedData) {
try {
await importSeedData();
} catch (error) {
console.log("Could not import seed data");
console.error(error);
}
}
};

27
backend/src/components/elements/feature-column.json

@ -0,0 +1,27 @@
{
"collectionName": "components_slices_feature_columns",
"info": {
"name": "FeatureColumn",
"displayName": "Feature column",
"icon": "align-center",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"description": {
"type": "text"
},
"icon": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": true
}
}
}

33
backend/src/components/elements/feature-row.json

@ -0,0 +1,33 @@
{
"collectionName": "components_slices_feature_rows",
"info": {
"name": "FeatureRow",
"displayName": "Feature row",
"icon": "arrows-alt-h",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"description": {
"type": "text"
},
"media": {
"allowedTypes": [
"images",
"videos"
],
"type": "media",
"multiple": false,
"required": true
},
"link": {
"type": "component",
"repeatable": false,
"component": "links.link"
}
}
}

14
backend/src/components/elements/feature.json

@ -0,0 +1,14 @@
{
"collectionName": "components_elements_features",
"info": {
"name": "feature",
"displayName": "Feature",
"icon": "traffic-light"
},
"options": {},
"attributes": {
"name": {
"type": "string"
}
}
}

19
backend/src/components/elements/footer-section.json

@ -0,0 +1,19 @@
{
"collectionName": "components_links_footer_sections",
"info": {
"name": "FooterSection",
"displayName": "Footer section",
"icon": "chevron-circle-down"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"links": {
"type": "component",
"repeatable": true,
"component": "links.link"
}
}
}

22
backend/src/components/elements/logos.json

@ -0,0 +1,22 @@
{
"collectionName": "components_elements_logos",
"info": {
"name": "logos",
"displayName": "Logos",
"icon": "apple-alt"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"logo": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": false
}
}
}

23
backend/src/components/elements/notification-banner.json

@ -0,0 +1,23 @@
{
"collectionName": "components_elements_notification_banners",
"info": {
"name": "NotificationBanner",
"displayName": "Notification banner",
"icon": "exclamation"
},
"options": {},
"attributes": {
"text": {
"type": "richtext"
},
"type": {
"type": "enumeration",
"enum": [
"alert",
"info",
"warning"
],
"required": true
}
}
}

31
backend/src/components/elements/plan.json

@ -0,0 +1,31 @@
{
"collectionName": "components_elements_plans",
"info": {
"name": "plan",
"displayName": "Pricing plan",
"icon": "search-dollar"
},
"options": {},
"attributes": {
"name": {
"type": "string"
},
"description": {
"type": "text"
},
"features": {
"type": "component",
"repeatable": true,
"component": "elements.feature"
},
"isRecommended": {
"type": "boolean"
},
"price": {
"type": "decimal"
},
"pricePeriod": {
"type": "string"
}
}
}

39
backend/src/components/elements/testimonial.json

@ -0,0 +1,39 @@
{
"collectionName": "components_slices_testimonials",
"info": {
"name": "Testimonial",
"displayName": "Testimonial",
"icon": "user-check"
},
"options": {},
"attributes": {
"logo": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": false
},
"picture": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": false
},
"text": {
"type": "text"
},
"authorName": {
"type": "string"
},
"authorTitle": {
"type": "string"
},
"link": {
"type": "string"
}
}
}

27
backend/src/components/layout/footer.json

@ -0,0 +1,27 @@
{
"collectionName": "components_layout_footers",
"info": {
"name": "Footer",
"displayName": "Footer",
"icon": "caret-square-down"
},
"options": {},
"attributes": {
"logo": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": false
},
"columns": {
"type": "component",
"repeatable": true,
"component": "elements.footer-section"
},
"smallText": {
"type": "string"
}
}
}

30
backend/src/components/layout/navbar.json

@ -0,0 +1,30 @@
{
"collectionName": "components_layout_navbars",
"info": {
"name": "Navbar",
"displayName": "Navbar",
"icon": "map-signs",
"description": ""
},
"options": {},
"attributes": {
"links": {
"type": "component",
"repeatable": true,
"component": "links.link"
},
"button": {
"type": "component",
"repeatable": false,
"component": "links.button-link"
},
"logo": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": true
}
}
}

29
backend/src/components/links/button-link.json

@ -0,0 +1,29 @@
{
"collectionName": "components_links_buttons",
"info": {
"name": "Button-link",
"displayName": "Button link",
"icon": "fingerprint",
"description": ""
},
"options": {},
"attributes": {
"url": {
"type": "string"
},
"newTab": {
"type": "boolean",
"default": false
},
"text": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"primary",
"secondary"
]
}
}
}

22
backend/src/components/links/button.json

@ -0,0 +1,22 @@
{
"collectionName": "components_links_simple_buttons",
"info": {
"name": "Button",
"displayName": "Button",
"icon": "fingerprint",
"description": ""
},
"options": {},
"attributes": {
"text": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"primary",
"secondary"
]
}
}
}

24
backend/src/components/links/link.json

@ -0,0 +1,24 @@
{
"collectionName": "components_links_links",
"info": {
"name": "Link",
"displayName": "Link",
"icon": "link",
"description": ""
},
"options": {},
"attributes": {
"url": {
"type": "string",
"required": true
},
"newTab": {
"type": "boolean",
"default": false
},
"text": {
"type": "string",
"required": true
}
}
}

40
backend/src/components/meta/metadata.json

@ -0,0 +1,40 @@
{
"collectionName": "components_meta_metadata",
"info": {
"name": "Metadata",
"displayName": "Metadata",
"icon": "robot"
},
"options": {},
"attributes": {
"metaTitle": {
"type": "string",
"required": true
},
"metaDescription": {
"type": "text",
"required": true
},
"shareImage": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": false
},
"twitterCardType": {
"type": "enumeration",
"enum": [
"summary",
"summary_large_image",
"app",
"player"
],
"default": "summary"
},
"twitterUsername": {
"type": "string"
}
}
}

19
backend/src/components/sections/bottom-actions.json

@ -0,0 +1,19 @@
{
"collectionName": "components_slices_bottom_actions",
"info": {
"name": "BottomActions",
"displayName": "Bottom actions",
"icon": "angle-double-right"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"buttons": {
"type": "component",
"repeatable": true,
"component": "links.button-link"
}
}
}

16
backend/src/components/sections/feature-columns-group.json

@ -0,0 +1,16 @@
{
"collectionName": "components_slices_feature_columns_groups",
"info": {
"name": "FeatureColumnsGroup",
"displayName": "Feature columns group",
"icon": "star-of-life"
},
"options": {},
"attributes": {
"features": {
"type": "component",
"repeatable": true,
"component": "elements.feature-column"
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save