From f408674deb69679e694b428232ecd6bddceb8415 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 15 Mar 2025 21:02:25 +0000 Subject: [PATCH] Revert to version 1a320ee --- .gitignore | 5 + README.md | 2 +- backend/README.md | 6 +- backend/package.json | 4 +- backend/src/config.js | 11 +-- backend/src/db/db.config.js | 2 +- .../db/seeders/20231127130745-sample-data.js | 93 ++++++++++++++++++- backend/src/index.js | 12 +-- backend/src/services/notifications/list.js | 2 +- docker/docker-compose.yml | 2 +- frontend/README.md | 2 +- frontend/src/components/AsideMenuLayer.tsx | 2 +- .../components/WebPageComponents/Footer.tsx | 2 +- .../components/WebPageComponents/Header.tsx | 2 +- frontend/src/pages/_app.tsx | 14 +-- frontend/src/pages/index.tsx | 18 ++-- frontend/src/pages/login.tsx | 45 +-------- frontend/src/pages/privacy-policy.tsx | 2 +- frontend/src/pages/terms-of-use.tsx | 2 +- frontend/src/pages/web_pages/about.tsx | 14 +-- frontend/src/pages/web_pages/contact.tsx | 10 +- frontend/src/pages/web_pages/faq.tsx | 10 +- frontend/src/pages/web_pages/home.tsx | 18 ++-- frontend/src/pages/web_pages/services.tsx | 14 +-- 24 files changed, 160 insertions(+), 134 deletions(-) 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 44ace3f..358b8a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# f45f54f45f45h54 +# FLPMSUPERSTAR ## This project was generated by [Flatlogic Platform](https://flatlogic.com). diff --git a/backend/README.md b/backend/README.md index bf58217..8fc1a6e 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,4 +1,4 @@ -#f45f54f45f45h54 - template backend, +#FLPMSUPERSTAR - template backend, #### Run App on local machine: @@ -38,10 +38,10 @@ - Type this command to creating a new database. - - `postgres=> CREATE DATABASE db_f45f54f45f45h54;` + - `postgres=> CREATE DATABASE db_flpmsuperstar;` - Then give that new user privileges to the new database then quit the `psql`. - - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_f45f54f45f45h54 TO admin;` + - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_flpmsuperstar TO admin;` - `postgres=> \q` --- diff --git a/backend/package.json b/backend/package.json index a664768..719f62f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { - "name": "f45f54f45f45h54", - "description": "f45f54f45f45h54 - template backend", + "name": "flpmsuperstar", + "description": "FLPMSUPERSTAR - template backend", "scripts": { "start": "npm run db:migrate && npm run db:seed && nodemon ./src/index.js", "db:migrate": "sequelize-cli db:migrate", diff --git a/backend/src/config.js b/backend/src/config.js index 94d4c85..4034f48 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: '628510f17ff4fc3c44d6e6fee912d290', + hash: 'afeefb9d49f5b7977577876b99532ac7', }, bcrypt: { saltRounds: 12, @@ -36,7 +36,7 @@ const config = { }, uploadDir: os.tmpdir(), email: { - from: 'f45f54f45f45h54 ', + from: 'FLPMSUPERSTAR ', host: 'email-smtp.us-east-1.amazonaws.com', port: 587, auth: { @@ -51,13 +51,6 @@ const config = { admin: 'Administrator', user: 'User', }, - - project_uuid: '7abe8e7f-14b3-4ca1-b9a7-d941ee8181aa', - flHost: - process.env.NODE_ENV === 'production' || - process.env.NODE_ENV === 'dev_stage' - ? 'https://flatlogic.com/projects' - : 'http://localhost:3000/projects', }; config.pexelsKey = 'Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18'; config.pexelsQuery = 'abstract teamwork collaboration'; diff --git a/backend/src/db/db.config.js b/backend/src/db/db.config.js index ca2533c..5d34460 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_f45f54f45f45h54', + database: 'db_flpmsuperstar', 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 b823255..94b9769 100644 --- a/backend/src/db/seeders/20231127130745-sample-data.js +++ b/backend/src/db/seeders/20231127130745-sample-data.js @@ -31,6 +31,14 @@ const CommentsData = [ // type code here for "relation_one" field }, + + { + content: 'Testing will start next week.', + + // type code here for "relation_one" field + + // type code here for "relation_one" field + }, ]; const ProjectsData = [ @@ -65,6 +73,16 @@ const ProjectsData = [ // type code here for "relation_one" field }, + + { + name: 'Project Delta', + + description: 'Deployment and maintenance of the project management tool.', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const TasksData = [ @@ -73,7 +91,7 @@ const TasksData = [ description: 'Create wireframes and design the user interface.', - status: 'InProgress', + status: 'Done', // type code here for "relation_one" field @@ -89,7 +107,7 @@ const TasksData = [ description: 'Implement the backend services and APIs.', - status: 'InProgress', + status: 'ToDo', // type code here for "relation_one" field @@ -115,6 +133,22 @@ const TasksData = [ due_date: new Date('2023-10-25T17:00:00Z'), }, + + { + title: 'Conduct Testing', + + description: 'Perform unit and integration testing.', + + status: 'InProgress', + + // type code here for "relation_one" field + + // type code here for "relation_one" field + + start_date: new Date('2023-10-20T09:00:00Z'), + + due_date: new Date('2023-10-30T17:00:00Z'), + }, ]; // Similar logic for "relation_many" @@ -152,6 +186,17 @@ async function associateCommentWithTask() { if (Comment2?.setTask) { await Comment2.setTask(relatedTask2); } + + const relatedTask3 = await Tasks.findOne({ + offset: Math.floor(Math.random() * (await Tasks.count())), + }); + const Comment3 = await Comments.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Comment3?.setTask) { + await Comment3.setTask(relatedTask3); + } } async function associateCommentWithAuthor() { @@ -187,6 +232,17 @@ async function associateCommentWithAuthor() { if (Comment2?.setAuthor) { await Comment2.setAuthor(relatedAuthor2); } + + const relatedAuthor3 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Comment3 = await Comments.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Comment3?.setAuthor) { + await Comment3.setAuthor(relatedAuthor3); + } } // Similar logic for "relation_many" @@ -224,6 +280,17 @@ async function associateProjectWithOwner() { if (Project2?.setOwner) { await Project2.setOwner(relatedOwner2); } + + const relatedOwner3 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Project3 = await Projects.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Project3?.setOwner) { + await Project3.setOwner(relatedOwner3); + } } async function associateTaskWithProject() { @@ -259,6 +326,17 @@ async function associateTaskWithProject() { if (Task2?.setProject) { await Task2.setProject(relatedProject2); } + + const relatedProject3 = await Projects.findOne({ + offset: Math.floor(Math.random() * (await Projects.count())), + }); + const Task3 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Task3?.setProject) { + await Task3.setProject(relatedProject3); + } } async function associateTaskWithAssignee() { @@ -294,6 +372,17 @@ async function associateTaskWithAssignee() { if (Task2?.setAssignee) { await Task2.setAssignee(relatedAssignee2); } + + const relatedAssignee3 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Task3 = await Tasks.findOne({ + order: [['id', 'ASC']], + offset: 3, + }); + if (Task3?.setAssignee) { + await Task3.setAssignee(relatedAssignee3); + } } module.exports = { diff --git a/backend/src/index.js b/backend/src/index.js index 739d6b3..afa881b 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -15,8 +15,6 @@ const fileRoutes = require('./routes/file'); const searchRoutes = require('./routes/search'); const pexelsRoutes = require('./routes/pexels'); -const openaiRoutes = require('./routes/openai'); - const contactFormRoutes = require('./routes/contactForm'); const usersRoutes = require('./routes/users'); @@ -36,9 +34,9 @@ const options = { openapi: '3.0.0', info: { version: '1.0.0', - title: 'f45f54f45f45h54', + title: 'FLPMSUPERSTAR', description: - 'f45f54f45f45h54 Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', + 'FLPMSUPERSTAR Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', }, servers: [ { @@ -126,12 +124,6 @@ app.use( permissionsRoutes, ); -app.use( - '/api/openai', - passport.authenticate('jwt', { session: false }), - openaiRoutes, -); - app.use('/api/contact-form', contactFormRoutes); app.use( diff --git a/backend/src/services/notifications/list.js b/backend/src/services/notifications/list.js index d23b235..87c2cb5 100644 --- a/backend/src/services/notifications/list.js +++ b/backend/src/services/notifications/list.js @@ -1,6 +1,6 @@ const errors = { app: { - title: 'f45f54f45f45h54', + title: 'FLPMSUPERSTAR', }, auth: { diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 65e6125..89e2303 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_f45f54f45f45h54 + - POSTGRES_DB=db_flpmsuperstar ports: - "5432:5432" backend: diff --git a/frontend/README.md b/frontend/README.md index bfb48e2..974461a 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,4 +1,4 @@ -# f45f54f45f45h54 +# FLPMSUPERSTAR ## This project was generated by Flatlogic Platform. diff --git a/frontend/src/components/AsideMenuLayer.tsx b/frontend/src/components/AsideMenuLayer.tsx index 96acd81..39248c4 100644 --- a/frontend/src/components/AsideMenuLayer.tsx +++ b/frontend/src/components/AsideMenuLayer.tsx @@ -44,7 +44,7 @@ export default function AsideMenuLayer({ >
- f45f54f45f45h54 + FLPMSUPERSTAR