mhmadalaa / bookipedia Goto Github PK
View Code? Open in Web Editor NEWBackend for our graduation project (Bookipedia app)
Home Page: https://bookipedia-backend.onrender.com
License: GNU General Public License v3.0
Backend for our graduation project (Bookipedia app)
Home Page: https://bookipedia-backend.onrender.com
License: GNU General Public License v3.0
user now not linked with app resources, so as we currently add authentication functionalities, we can easily linked all of that with the logged in user
handle user, cover images efficiently
endpoint to get specific user books is not implemented
The problem we have is
right now we have books, documents, two different mongodb collections.
so the unique identfier for each (id) is provide the uniqeness only for each collection.
but we need to apply the uniquenss for booth (books, documents), why??
tasks like ask AI Questions or Chat will force us to create multible routers, controllers to handle this to make the operation of dealing with client-backend-ai by id is provide a really identfing key
in conclusion to provide a unique key to make the operations more optimal and not increasing overhead for each part of code-functionallity,
we need to just add a unique key across two collections (books and documents)
I chat with chatGpt to get a hints to start with, and that's the conversation
https://chat.openai.com/share/3793c306-2c49-4e24-8a6c-1361df347fa7
when we deployed the api in different machines, it raised a bug where the Date.now() function creates a different date across to machine timezone, where it shouldn't do that behavior.
nodejs doesn't do that, but mongoose driver do this issue.
so, we need to globalize the way that all the application create the date with. and it should be based on UTC
After finishing phase1 we need to take a look to database schemes to index some fields to make querying the data more efficient
maybe the .env
file is not updated
add to docs
branch
Implement different endpoints to perform CRUD operations and some bussiness logic needs on BOOKS Database
we need to add the admin role functionality, how it will be handled. and if there will be a pecial authentication for him or not
Add linter to catch errors, apply code best practices, etc..
Formatter to automate the process of code formatting which make it easier to write and read code.
source to read about them https://www.freecodecamp.org/news/using-prettier-and-jslint/
add documentation about the project structure for each folder purpose and a brief description of important files
in branch => docs
#1
let book cover images being accessd and stored in public folder with .jpg
extenstion
Implement backend endpoints to accept client requests to AI
write the documentation for AI endpoints for the integration between backend-ai
There is a securtiy bug in this login code
as now if someone needs to attack the app, it can easily discover what is the emails subscripe in our application by just enter random emails. and then work on these collected emails and try to discover what is there passwords.
but what if the hacker only get generic error response in this case! aka not a valid email or password
?? it cannot easily discover what your subscriped emails?
according to owsap auth guidlines also https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md#authentication-and-error-messages
there still an issue while figuring out how we can identify from client requests that is the sended id needed some operations is a book or a document id?
so until this point there will be a field in the response from book or document model say: book: true
, or document: true
and when requesting when any file url it will be required from the request to have a query parameter called /type?book=true
or /type?document=true
to apply the integrity above books and docuemnts without any false-referencing
acually this problem we may face only for these two rotuers
because they do one jop for both books and documents and not an idivdual endpoints for backend, we will integrate with ai-api throw it! so it needs to focs on that only throw endpoints requirements or request body
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.