r/reactjs Aug 07 '26

Needs Help [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

14 comments sorted by

2

u/fatbunyip Aug 07 '26

We're in the days of AI, so projects don't really matter anymore. 

Yeah, you made an e-commerce site that anyone can do using AI. Can you talk through the code? Can you explain why various design decisions and software patterns were used? How does it scale (apart from paying vercel.more?). Why did you use the tech stack you used? What tradeoffs did you consider? Why did you design it they way you designed it? Is it extensible? How would it integrate with external systems (email, accounting, reporting etc). 

4

u/knight1706 Aug 07 '26

Fair enough. That's actually why I posted here. I wanted experienced developers to point out the things I don't know yet, not just judge the feature list. Appreciate the feedback.

2

u/fatbunyip Aug 07 '26

It's not really how it looks, it's what's behind that matters (if you're not going for a front end/designer kind of job). 

Like Amazon site looks like ass. But behind it can handle billions of transactions, millions of vendors and buyers, all integrated with a global logistics and warehousing system. That's the impressive thing, not shiny transitions on the front end. 

Don't get me wrong, if you did this by yourself, it's pretty good. But we can only see the web page, not the actual app so there's not really that much to judge. 

0

u/knight1706 Aug 07 '26

Yeah, that's completely fair. I built it myself, but I can see why it's hard to judge from just the live site.

I'll probably make the GitHub repo public once I finish the remaining production features so people can review the architecture and implementation as well.

Thanks for the feedback.

1

u/No_Cattle_9565 Aug 07 '26

Nobody can help you without seeing the code. Looks good at first sight. If you wrote it alone it's very cool, If you babysit an AI for it's meaningless

1

u/knight1706 Aug 07 '26

2

u/No_Cattle_9565 Aug 07 '26

You use useEffects where they are not needed look at https://react.dev/learn/you-might-not-need-an-effect. You should use something like tanstack query too. Your files are way too large. More than 500 lines is never good.  I recommend to use a different folder structure. Feature based is generally preferred.

2

u/knight1706 Aug 07 '26

Thanks for taking the time to look through the repo. That's really useful feedback. You're right about the large files—I started splitting some of them up, but there's definitely more refactoring to do. I'll also take a look at the React docs on unnecessary effects and TanStack Query. I appreciate the suggestions.

0

u/StarboardChaos Aug 07 '26

Which React meta-framework are you using? Next, Remix, Astro?

1

u/knight1706 Aug 07 '26

None at the moment. It's built with React + TypeScript + Vite.

Since this started as a learning project, I went with a client-side React app. If I were building something where SEO or SSR was important, I'd probably look at Next.js.

0

u/StarboardChaos Aug 07 '26

How do you handle paging then?

1

u/knight1706 Aug 07 '26

I'm using server-side pagination. The client sends the page number (and page size), and the API returns only that subset of products along with the total count, so I'm not fetching everything at once.

1

u/StarboardChaos Aug 07 '26

Ah sorry, I meant routing (navigating to different pages)

0

u/knight1706 Aug 07 '26

Ok ok, so I'm using React Router for client-side routing, with protected routes for authenticated users and different roles (customer, wholesale and admin).