diff --git a/.gitignore b/.gitignore index e427ff3..d0eb167 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ node_modules/ */node_modules/ */build/ + +**/node_modules/ +**/build/ +.DS_Store +.env \ No newline at end of file diff --git a/README.md b/README.md index bd76514..ccf68df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# surprise me wtf +# My 2nd Bobapp ## This project was generated by [Flatlogic Platform](https://flatlogic.com). diff --git a/backend/README.md b/backend/README.md index eb79a75..fbbd97c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,4 +1,4 @@ -#surprise me wtf - template backend, +#My 2nd Bobapp - template backend, #### Run App on local machine: @@ -38,10 +38,10 @@ - Type this command to creating a new database. - - `postgres=> CREATE DATABASE db_surprise_me_wtf;` + - `postgres=> CREATE DATABASE db_my_2nd_bobapp;` - Then give that new user privileges to the new database then quit the `psql`. - - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_surprise_me_wtf TO admin;` + - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_my_2nd_bobapp TO admin;` - `postgres=> \q` --- diff --git a/backend/package.json b/backend/package.json index a8060fe..b78fd4e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { - "name": "surprisemewtf", - "description": "surprise me wtf - template backend", + "name": "my2ndbobapp", + "description": "My 2nd Bobapp - template backend", "scripts": { "start": "npm run db:migrate && npm run db:seed && nodemon ./src/index.js --delay 1000", "db:migrate": "sequelize-cli db:migrate", diff --git a/backend/src/config.js b/backend/src/config.js index ed31485..4b192c1 100644 --- a/backend/src/config.js +++ b/backend/src/config.js @@ -3,7 +3,7 @@ const os = require('os'); const config = { gcloud: { bucket: 'fldemo-files', - hash: '5cc3c56e0b59d46e071704ab7b534c1a', + hash: 'afeefb9d49f5b7977577876b99532ac7', }, bcrypt: { saltRounds: 12, @@ -35,7 +35,7 @@ const config = { }, uploadDir: os.tmpdir(), email: { - from: 'surprise me wtf ', + from: 'My 2nd Bobapp ', host: 'email-smtp.us-east-1.amazonaws.com', port: 587, auth: { diff --git a/backend/src/db/db.config.js b/backend/src/db/db.config.js index 0665f13..c869a48 100644 --- a/backend/src/db/db.config.js +++ b/backend/src/db/db.config.js @@ -13,7 +13,7 @@ module.exports = { username: 'postgres', dialect: 'postgres', password: '', - database: 'db_surprise_me_wtf', + database: 'db_my_2nd_bobapp', host: process.env.DB_HOST || 'localhost', logging: console.log, seederStorage: 'sequelize', diff --git a/backend/src/db/seeders/20231127130745-sample-data.js b/backend/src/db/seeders/20231127130745-sample-data.js index 9c3a664..bfccbf7 100644 --- a/backend/src/db/seeders/20231127130745-sample-data.js +++ b/backend/src/db/seeders/20231127130745-sample-data.js @@ -47,6 +47,30 @@ const CustomersData = [ // type code here for "relation_one" field }, + + { + name: 'Initech', + + email: 'sales@initech.com', + + phone: '555-4321', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, + + { + name: 'Umbrella Corp.', + + email: 'service@umbrella.com', + + phone: '555-6789', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const OrdersData = [ @@ -91,6 +115,34 @@ const OrdersData = [ // type code here for "relation_one" field }, + + { + order_number: 'ORD004', + + order_date: new Date('2023-10-04T09:45:00Z'), + + total_amount: 1800, + + // type code here for "relation_one" field + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, + + { + order_number: 'ORD005', + + order_date: new Date('2023-10-05T16:20:00Z'), + + total_amount: 2750, + + // type code here for "relation_one" field + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const ProductsData = [ @@ -129,6 +181,30 @@ const ProductsData = [ // type code here for "relation_one" field }, + + { + name: 'Widget D', + + price: 55, + + stock: 250, + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, + + { + name: 'Widget E', + + price: 65, + + stock: 300, + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const TasksData = [ @@ -137,7 +213,7 @@ const TasksData = [ description: 'Compile the sales data for Q3', - status: 'ToDo', + status: 'InProgress', start_date: new Date('2023-10-01T08:00:00Z'), @@ -169,7 +245,7 @@ const TasksData = [ description: 'Schedule and prepare agenda for team meeting', - status: 'ToDo', + status: 'InProgress', start_date: new Date('2023-10-03T10:00:00Z'), @@ -179,20 +255,60 @@ const TasksData = [ // type code here for "relation_one" field }, + + { + title: 'Review Financial Statements', + + description: 'Analyze the financial statements for discrepancies', + + status: 'ToDo', + + start_date: new Date('2023-10-04T12:00:00Z'), + + end_date: new Date('2023-10-07T15:00:00Z'), + + // type code here for "relation_one" field + + // type code here for "relation_one" field + }, + + { + title: 'Develop Marketing Strategy', + + description: 'Create a new marketing strategy for Q4', + + status: 'ToDo', + + start_date: new Date('2023-10-05T13:00:00Z'), + + end_date: new Date('2023-10-10T16:00:00Z'), + + // type code here for "relation_one" field + + // type code here for "relation_one" field + }, ]; const OrganizationsData = [ { - name: 'James Clerk Maxwell', + name: 'August Kekule', }, { - name: 'Jean Piaget', + name: 'Frederick Gowland Hopkins', + }, + + { + name: 'Wilhelm Wundt', }, { name: 'Paul Ehrlich', }, + + { + name: 'Isaac Newton', + }, ]; // Similar logic for "relation_many" @@ -230,6 +346,28 @@ async function associateUserWithOrganization() { if (User2?.setOrganization) { await User2.setOrganization(relatedOrganization2); } + + const relatedOrganization3 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const User3 = await Users.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (User3?.setOrganization) { + await User3.setOrganization(relatedOrganization3); + } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const User4 = await Users.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (User4?.setOrganization) { + await User4.setOrganization(relatedOrganization4); + } } // Similar logic for "relation_many" @@ -267,6 +405,28 @@ async function associateCustomerWithOrganization() { if (Customer2?.setOrganization) { await Customer2.setOrganization(relatedOrganization2); } + + const relatedOrganization3 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Customer3 = await Customers.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Customer3?.setOrganization) { + await Customer3.setOrganization(relatedOrganization3); + } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Customer4 = await Customers.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Customer4?.setOrganization) { + await Customer4.setOrganization(relatedOrganization4); + } } async function associateOrderWithCustomer() { @@ -302,6 +462,28 @@ async function associateOrderWithCustomer() { if (Order2?.setCustomer) { await Order2.setCustomer(relatedCustomer2); } + + const relatedCustomer3 = await Customers.findOne({ + offset: Math.floor(Math.random() * (await Customers.count())), + }); + const Order3 = await Orders.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Order3?.setCustomer) { + await Order3.setCustomer(relatedCustomer3); + } + + const relatedCustomer4 = await Customers.findOne({ + offset: Math.floor(Math.random() * (await Customers.count())), + }); + const Order4 = await Orders.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Order4?.setCustomer) { + await Order4.setCustomer(relatedCustomer4); + } } // Similar logic for "relation_many" @@ -339,6 +521,28 @@ async function associateOrderWithOrganization() { if (Order2?.setOrganization) { await Order2.setOrganization(relatedOrganization2); } + + const relatedOrganization3 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Order3 = await Orders.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Order3?.setOrganization) { + await Order3.setOrganization(relatedOrganization3); + } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Order4 = await Orders.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Order4?.setOrganization) { + await Order4.setOrganization(relatedOrganization4); + } } // Similar logic for "relation_many" @@ -376,6 +580,28 @@ async function associateProductWithOrganization() { if (Product2?.setOrganization) { await Product2.setOrganization(relatedOrganization2); } + + const relatedOrganization3 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Product3 = await Products.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Product3?.setOrganization) { + await Product3.setOrganization(relatedOrganization3); + } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Product4 = await Products.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Product4?.setOrganization) { + await Product4.setOrganization(relatedOrganization4); + } } async function associateTaskWithAssigned_user() { @@ -411,6 +637,28 @@ async function associateTaskWithAssigned_user() { if (Task2?.setAssigned_user) { await Task2.setAssigned_user(relatedAssigned_user2); } + + const relatedAssigned_user3 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Task3 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Task3?.setAssigned_user) { + await Task3.setAssigned_user(relatedAssigned_user3); + } + + const relatedAssigned_user4 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Task4 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Task4?.setAssigned_user) { + await Task4.setAssigned_user(relatedAssigned_user4); + } } async function associateTaskWithOrganization() { @@ -446,6 +694,28 @@ async function associateTaskWithOrganization() { if (Task2?.setOrganization) { await Task2.setOrganization(relatedOrganization2); } + + const relatedOrganization3 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Task3 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Task3?.setOrganization) { + await Task3.setOrganization(relatedOrganization3); + } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Task4 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Task4?.setOrganization) { + await Task4.setOrganization(relatedOrganization4); + } } module.exports = { diff --git a/backend/src/index.js b/backend/src/index.js index 8fc2776..1b34ec1 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -47,9 +47,9 @@ const options = { openapi: '3.0.0', info: { version: '1.0.0', - title: 'surprise me wtf', + title: 'My 2nd Bobapp', description: - 'surprise me wtf Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', + 'My 2nd Bobapp Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', }, servers: [ { diff --git a/backend/src/services/notifications/list.js b/backend/src/services/notifications/list.js index d6aa5d4..26dba3a 100644 --- a/backend/src/services/notifications/list.js +++ b/backend/src/services/notifications/list.js @@ -1,6 +1,6 @@ const errors = { app: { - title: 'surprise me wtf', + title: 'My 2nd Bobapp', }, auth: { diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9d64e6f..3c380dc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,7 +15,7 @@ services: - ./data/db:/var/lib/postgresql/data environment: - POSTGRES_HOST_AUTH_METHOD=trust - - POSTGRES_DB=db_surprise_me_wtf + - POSTGRES_DB=db_my_2nd_bobapp ports: - "5432:5432" backend: diff --git a/frontend/README.md b/frontend/README.md index 8fb339d..3c57069 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,4 +1,4 @@ -# surprise me wtf +# My 2nd Bobapp ## This project was generated by Flatlogic Platform. diff --git a/frontend/json/runtimeError.json b/frontend/json/runtimeError.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/frontend/json/runtimeError.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/frontend/src/components/AsideMenuLayer.tsx b/frontend/src/components/AsideMenuLayer.tsx index d5667af..29c8e8d 100644 --- a/frontend/src/components/AsideMenuLayer.tsx +++ b/frontend/src/components/AsideMenuLayer.tsx @@ -75,7 +75,7 @@ export default function AsideMenuLayer({ >
- surprise me wtf + My 2nd Bobapp {organizationName &&

{organizationName}

} diff --git a/frontend/src/components/WebPageComponents/Footer.tsx b/frontend/src/components/WebPageComponents/Footer.tsx index 081158b..3833078 100644 --- a/frontend/src/components/WebPageComponents/Footer.tsx +++ b/frontend/src/components/WebPageComponents/Footer.tsx @@ -20,7 +20,7 @@ export default function WebSiteFooter({ const style = FooterStyle.WITH_PROJECT_NAME; - const design = FooterDesigns.DESIGN_DIVERSITY; + const design = FooterDesigns.DEFAULT_DESIGN; return (
state.style.websiteHeder); const borders = useAppSelector((state) => state.style.borders); - const style = HeaderStyle.PAGES_LEFT; + const style = HeaderStyle.PAGES_RIGHT; - const design = HeaderDesigns.DESIGN_DIVERSITY; + const design = HeaderDesigns.DEFAULT_DESIGN; return (
state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -130,10 +130,10 @@ export default function WebSite() { content={`Discover our comprehensive enterprise management system that integrates CRM, ERP, and data management to streamline your business operations. Explore features, learn about our mission, and get in touch with us today.`} /> - +
- +
); } diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 7ca8a27..76f6364 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -50,7 +50,7 @@ export default function Login() { remember: true, }); - const title = 'surprise me wtf'; + const title = 'My 2nd Bobapp'; // Fetch Pexels image/video useEffect(() => { @@ -191,10 +191,7 @@ export default function Login() {
-

- {' '} - surprise me wtf -

+

My 2nd Bobapp

diff --git a/frontend/src/pages/privacy-policy.tsx b/frontend/src/pages/privacy-policy.tsx index 22eeb6d..2d74068 100644 --- a/frontend/src/pages/privacy-policy.tsx +++ b/frontend/src/pages/privacy-policy.tsx @@ -5,7 +5,7 @@ import LayoutGuest from '../layouts/Guest'; import { getPageTitle } from '../config'; export default function PrivacyPolicy() { - const title = 'surprise me wtf'; + const title = 'My 2nd Bobapp'; const [projectUrl, setProjectUrl] = useState(''); useEffect(() => { diff --git a/frontend/src/pages/terms-of-use.tsx b/frontend/src/pages/terms-of-use.tsx index aa31030..cbb9ea3 100644 --- a/frontend/src/pages/terms-of-use.tsx +++ b/frontend/src/pages/terms-of-use.tsx @@ -5,7 +5,7 @@ import LayoutGuest from '../layouts/Guest'; import { getPageTitle } from '../config'; export default function PrivacyPolicy() { - const title = 'surprise me wtf'; + const title = 'My 2nd Bobapp'; const [projectUrl, setProjectUrl] = useState(''); useEffect(() => { diff --git a/frontend/src/pages/web_pages/about.tsx b/frontend/src/pages/web_pages/about.tsx index c0ada53..0d2d671 100644 --- a/frontend/src/pages/web_pages/about.tsx +++ b/frontend/src/pages/web_pages/about.tsx @@ -24,7 +24,7 @@ import ContactFormSection from '../../components/WebPageComponents/ContactFormCo export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -89,10 +89,10 @@ export default function WebSite() { content={`Discover the mission, values, and team behind ${projectName}. Learn how our innovative platform is transforming business management and empowering organizations worldwide.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/contact.tsx b/frontend/src/pages/web_pages/contact.tsx index 4854157..b8b3b67 100644 --- a/frontend/src/pages/web_pages/contact.tsx +++ b/frontend/src/pages/web_pages/contact.tsx @@ -18,7 +18,7 @@ import ContactFormSection from '../../components/WebPageComponents/ContactFormCo export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -62,10 +62,10 @@ export default function WebSite() { content={`Reach out to ${projectName} for any inquiries or support. Our team is here to assist you with all your questions and provide the help you need.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/faq.tsx b/frontend/src/pages/web_pages/faq.tsx index d7d58e3..40ed86c 100644 --- a/frontend/src/pages/web_pages/faq.tsx +++ b/frontend/src/pages/web_pages/faq.tsx @@ -18,7 +18,7 @@ import FaqSection from '../../components/WebPageComponents/FaqComponent'; export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -100,10 +100,10 @@ export default function WebSite() { content={`Find answers to common questions about ${projectName}. Learn more about our features, services, and how we can help your business succeed.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/home.tsx b/frontend/src/pages/web_pages/home.tsx index 9fe0c6c..5276856 100644 --- a/frontend/src/pages/web_pages/home.tsx +++ b/frontend/src/pages/web_pages/home.tsx @@ -27,7 +27,7 @@ import FaqSection from '../../components/WebPageComponents/FaqComponent'; export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -130,10 +130,10 @@ export default function WebSite() { content={`Discover our comprehensive enterprise management system that integrates CRM, ERP, and data management to streamline your business operations. Explore features, learn about our mission, and get in touch with us today.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/services.tsx b/frontend/src/pages/web_pages/services.tsx index e450adf..0a35cfd 100644 --- a/frontend/src/pages/web_pages/services.tsx +++ b/frontend/src/pages/web_pages/services.tsx @@ -21,7 +21,7 @@ import ContactFormSection from '../../components/WebPageComponents/ContactFormCo export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'surprise me wtf'; + const projectName = 'My 2nd Bobapp'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -86,10 +86,10 @@ export default function WebSite() { content={`Explore the range of services provided by ${projectName}. From seamless integration to real-time analytics, learn how our solutions can enhance your business operations.`} /> - +
- + ); } diff --git a/pids/backend.pid b/pids/backend.pid index b8626c4..b8e817d 100644 --- a/pids/backend.pid +++ b/pids/backend.pid @@ -1 +1 @@ -4 +255 \ No newline at end of file diff --git a/pids/frontend.pid b/pids/frontend.pid index 00750ed..dd4a900 100644 --- a/pids/frontend.pid +++ b/pids/frontend.pid @@ -1 +1 @@ -3 +254 \ No newline at end of file