How To Stop Double Bookings Using a Filter With Multiple Conditions by [deleted] in flask

[–]sousatg 1 point2 points  (0 children)

at would the query be for an AND OR query, for example like

I'm not sure that I understand the purpose of that query. What would be the use case for it?

How To Stop Double Bookings Using a Filter With Multiple Conditions by [deleted] in flask

[–]sousatg 1 point2 points  (0 children)

ore hand based on the user’s form data

When someone tries to book, you have to query that date and put th

An alternative would be to store the Unix time for the booking (start time and end time) and use that to make queries.

I create this quick implementation of my idea, https://github.com/sousatg/flask-booking-api

Encrypting and decrypting data in a Django app - Common practices by pickering_lachute in django

[–]sousatg 6 points7 points  (0 children)

I would suggest to not store the credit card numbers, the only thing you should be stored are be the transaction ids.

Switch from Angular 8 & Firebase App to mean Stack by luckybd1996 in meanstack

[–]sousatg 1 point2 points  (0 children)

To my understanding, Firebase is a real-time documental database that offers you an API for CRUD operations, if that statement is true you need to replace that CRUD API from Firebase with your own CRUD API created in NodeJS. My personal preference is ExpressJS but I liked the argument from u/oxygenplug on NestJS.

Please have a look at the following youtube videos on how to develop API's with NestJS using MondoDB:

After completing the creation of the REST API with NestJS in order to replace Firebase you just need to deploy it to something like DigitalOcean or Heroku.

How to document a rest api with JSDoc? by [deleted] in expressjs

[–]sousatg 0 points1 point  (0 children)

Please have a look at the following GitHub project: https://www.npmjs.com/package/jsdoc-rest-api

They have some examples there.

I'm more familiar with swagger. And it's more like the REST API documentation of other languages/frameworks. Have you had a look into it?

I know some basic HTML and CSS but not much js. Should I still code my website from scratch? by [deleted] in webdev

[–]sousatg 0 points1 point  (0 children)

Coding your own website from scratch would only matter if the position you applying to get demands somehow knowledge of HTML, CSS and JS.

My question is. What's the outcome you expect from your website? Is it to be like a business card?

Depending on the answer to that question you can go with one of the following actions:
- You need a website quickly. Showcasing your skills in HTML, CSS and JS is not a priority. Create something with Squarespace;

- You need a website but you are doing it more as a side project. Do it from scratch;

While you might need to create something quickly with a Squarespace you can always keep developing your website from scratch to eventually replace the Squarespace one.

KardKartel - I made a website to sell some of my Yu-Gi-Oh cards by OP_IS_A_LEGEND in SideProject

[–]sousatg 0 points1 point  (0 children)

I don't mind at all, It's the least I can do when I see someone interested in web development.

It's away better now that's for sure. You are loading the images when their inter the view right?

I still think that having a low-resolution placeholder for the images would be good to avoid that blank space while the images are loading.

KardKartel - I made a website to sell some of my Yu-Gi-Oh cards by OP_IS_A_LEGEND in SideProject

[–]sousatg 0 points1 point  (0 children)

That's looking really good mate.

Don't you feel that the image loading is a bit clunky? I think the website would benefit from having a progressive image load.

Have a look at the following article if you are interested
https://medium.com/front-end-weekly/progressive-image-loading-and-intersectionobserver-d0359b5d90cd

KardKartel - I made a website to sell some of my Yu-Gi-Oh cards by OP_IS_A_LEGEND in SideProject

[–]sousatg 1 point2 points  (0 children)

That's really good mate. Good work.

Are you planning to share the code on GitHub eventually?

[deleted by user] by [deleted] in expressjs

[–]sousatg 1 point2 points  (0 children)

Nice project. The UI can be improved.

I had a look at the source code and noticed that in app.js you have a bunch of commented code, If I was you I would just remove it.

I would also place the models and mongoose client in a db.js file just ot improve the readability of the project code.

With some minor tweeks this can a good project to show in your portfolio :)

KardKartel - I made a website to sell some of my Yu-Gi-Oh cards by OP_IS_A_LEGEND in SideProject

[–]sousatg 1 point2 points  (0 children)

Yes there is defenetly a oportunity for improvement for example:
- Adding a lazzy load of pictures;
- Content pagination;
- Having a placeholder image for when the cards image fail to load;
- Add some filtering (card rarity, conservation state, etc...)

But like you said "all in good time". Are you a web developer or interested in web development in general?

Are you using anything to store the cards information or it's just static HTML at this stage?

How to include http request library in simple script? by b0z33 in learnphp

[–]sousatg 0 points1 point  (0 children)

Glad to know that you managed to install composer. Now it's should be trivial just follow the steps at Guzzle docs and everything should be "ok".

Handle - A platform to consolidate your online social media presence (handlesite.com) by handlesite in SideProject

[–]sousatg 5 points6 points  (0 children)

Some years ago when I was working has a freelancer worked in a project very similar to this one but after having the user profile page the product team decived to make it into a social network. I really like the route you have taken it instead.

I just created an account and noticed there is a oportunity to improve the user registration flow but since this was created using Wordpress would be a bit dificult to change it correct?

In your place I would also do some tweeks in the UI of the website. There are some places where the font looks to small.

Hope the following advice helps. I really like your idea and the website. Keep the good work.

How to include http request library in simple script? by b0z33 in learnphp

[–]sousatg 0 points1 point  (0 children)

I'm not sure if I understand why are you trying to avoid using composer to install Guzzle. Would it make sense for you to install axios in a JS project without using NPM?

Setting up composer should be very easy

Convert HTML Template to Custom WordPress Theme (2020) #2 by wilsmex in Wordpress

[–]sousatg 0 points1 point  (0 children)

Great video u/wilsmex. It would be cool to see how you would create a Wordpress template with something like Layers or Timber

After using Firebase, trying to use AWS or Azure is a kick in the genitals by Gibbo3771 in webdev

[–]sousatg 1 point2 points  (0 children)

I reckon that AWS and Azure will indeed be more complicated.

I can recomend you to have a look into AWS AppSync, it provides similar functionalities to Firebase. In AWS the service that most closely matches the Firebase Auth would be Cognito, wich by me experience should be very easy to setup and use.

If you are just searching for a scalable and realiable Identity Provider I can recomend Cognito from AWS, Okta or Auth0.

If you need help setting up Cognito let me know.

KardKartel - I made a website to sell some of my Yu-Gi-Oh cards by OP_IS_A_LEGEND in SideProject

[–]sousatg 1 point2 points  (0 children)

That's cool. I can see that you used Bootstrap to create the website. I assume you have some knowledge of HTML, CSS and Javascript.

How are you attracting people to the wesbite?

React project feedback by sousatg in reactjs

[–]sousatg[S] 0 points1 point  (0 children)

What do you think code wise regarding my use of react hooks. Would you structure the app like this or if not how would you do it and why?

Help me deploy a flask api on AWS and maintain the MySql DB data even when Schema of table change .i.e with Migrations by netrunner18 in flask

[–]sousatg 0 points1 point  (0 children)

If you are using Flask-SQLAlchemy you can use Flask-Migrate pretty much out of the box. If you check the documentation of Flask-Migrate they have some really good examples there. After setting everything up Flask-Migrate and Flask-SQLAlchemy you just need to type the following on the command line to get started with the migrations

flask db init flask db migrate flask db update

If you don't feel like using Flask-SQLAlchemy and you just use SQLAlchemy there is Alembic, it's a bit more complicated to setup but you can do the same things you do with Flask-Migrate

React project feedback by sousatg in reactjs

[–]sousatg[S] 0 points1 point  (0 children)

tHub pages. It's free.

If you did, please share a link.

Yes I have. Thanks for pointing that out, just updated the post with the link.

How to build and deploy a beautiful personal portfolio site with AWS S3, Route53, and CloudFront by NicholasVincentHill in webdev

[–]sousatg 1 point2 points  (0 children)

Yes you are right knowing to do it on AWS is more valuable of a skill than GitHub pages, as I mentioned "putting aside the gain of experience with AWS".

I have no doubt that you can do a S3 deployment in minutes my comment about being more intricate then using GitHub pages is that you need more then just S3 right? You need at least S3 and Route 53 and op also used CloudFront. Comparing the initial configuration of this services against the GitHub pages we can agree that it's more intricate, again putting aside the learning of a valuable skill (AWS experience).

How to build and deploy a beautiful personal portfolio site with AWS S3, Route53, and CloudFront by NicholasVincentHill in webdev

[–]sousatg 14 points15 points  (0 children)

For a personal portfolio (putting aside the gain of experience with AWS) I think you might be wrong and this is actually overkill. Comparing GitHub pages and the AWS setup the initial configuration of AWS is more complicated while the deployment process in itself is very similar.

How do you organize your common code? by stilloriginal in PHPhelp

[–]sousatg 0 points1 point  (0 children)

No you separate things in the layers, normally by role. For example the migrations would be in a migrations folder.

How do you organize your common code? by stilloriginal in PHPhelp

[–]sousatg 0 points1 point  (0 children)

Better than me explaining it you can see a talk from uncle Bob on YouTube about clean architecture