Codebase Tour Of An Advanced React / Next.js Project

  Рет қаралды 2,928

Profy dev

Profy dev

Күн бұрын

The code on GitHub: github.com/profydev/prolog-app
The folder structure is inspired by Bulletproof React: github.com/alan2207/bulletpro...
If you’d like to work on this codebase get on the waitlist for the React Job Simulator: profy.dev/waitlist
00:00 - First Marker
00:17 - available scripts in package.json
01:09 - folder structure
02:16 - ESLint
03:03 - Prettier
03:58 - TypeScript
05:41 - Husky & lint-staged
07:24 - Cypress
07:49 - Jest
07:54 - Storybook
08:21 - styled-components
08:53 - Continuous Integration With GitHub Actions

Пікірлер: 14
@annusingh4694
@annusingh4694 Жыл бұрын
Loved this video 💯
@MBK90210
@MBK90210 Жыл бұрын
I really love this, wasnt able to join your first cohort due to monetary constraints but I hope you will make all the materials available at a later stage when someone interested is finally able to sign up.... I try to consume as much of the free material as I can
@profydev
@profydev Жыл бұрын
Thanks a lot for the feedback. That means a lot. I'll try to make the job simulator as affordable as possible with PPP discounts. Hopefully that'll help you :)
@ssj1260
@ssj1260 Жыл бұрын
Great video, incredibly valuable to see how different the structure of the project looks compared to my own. Quick question. In the project, in features > projects > components > project-card > index.ts, it just contains one line export (export { ProjectCard } from "./project-card") The same with ui > index.ts, it just has all the export * from ./badge etc. What is the purpose of this? I haven't seen this before.
@profydev
@profydev Жыл бұрын
Thanks a lot for the feedback. Honestly, this is just one of many options for folder structures. From my experience you also often see the typical components, contexts, and hooks folder structure in production projects. As for the index.ts file: People call this the "public API" of the component (or whatever is in the file). This file decides what parts of the folder or exports should be visible to the outside of this folder. It makes more sense when you have many files in one folder (e.g. a component with many subcomponents) but only the main component is supposed to be used in the application. I don't have a great example in this app but the issue list component is the best I could find: github.com/profydev/prolog-app/tree/main/features/issues/components/IssueList So basically instead of writing ``` import { IssueList } from "features/issues/components/issue-list/issue-list" ``` you can write ``` import { IssueList } from "features/issues/components/issue-list" ``` Or even simpler because the feature exports the component ``` import { IssueList } from "features/issues" ``` I hope that makes sense :) In the Bulletproof React project there is also a longer explanation: github.com/alan2207/bulletproof-react/blob/2facb64e827836fcd3ead4c1f7603760b7456619/docs/project-structure.md
@ssj1260
@ssj1260 Жыл бұрын
@@profydev Greatly appreciated, thank you so much, looking forward to the React Job Simulator
@przemekgaezki1606
@przemekgaezki1606 Жыл бұрын
can i use these in react native also?
@andresteward8226
@andresteward8226 Жыл бұрын
how familiar do we need to be with typescript?
@profydev
@profydev Жыл бұрын
The idea is that you can learn it while working on the project. There are lots of examples in the codebase that you can reference. So from my perspective there's no need for experience with TS
@akaRong
@akaRong Жыл бұрын
Hi, that's pretty awesome. I have one question for application NextJS + DRF how should I deploy to production. Should I deploy backend and frontend (vercel) separately or should I docker them and Nginx as a web server? Could you share some idea? Much Appreciate.
@profydev
@profydev Жыл бұрын
I guess it depends :) Vercel gives you a lot of things out of the box. Like preview deployments from your PRs, CDN, and probably a lot more. So it's definitely a good idea if you use vercel for your frontend. From what I heard their pricing can explode though if you make heavy use of API routes. An advantage of deploying them together is that latency is low. Docker can become complex though so it might take you some time if you're new to it. You can also check out railway.app
@akaRong
@akaRong Жыл бұрын
@@profydev Thank you so much for your idea.
@gp5109
@gp5109 Жыл бұрын
Hi, I'm a beginner in React. What makes this project advanced?
@profydev
@profydev Жыл бұрын
The codebase isn't very big yet but the tooling (incl CI setup) and folder structure are state of the art imo. In beginner projects you typically don't find all this stuff that I'm talking about in the video. Not sure if that answers your question :)
When Jax'S Love For Pomni Is Prevented By Pomni'S Door 😂️
00:26
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 22 МЛН
The delivery rescued them
00:52
Mamasoboliha
Рет қаралды 10 МЛН
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 20 МЛН
How Neovim saved me at least 30 minutes today
8:12
Rasmus Bergström
Рет қаралды 7 М.
I Abandoned Next.js... Again
7:58
Robin He
Рет қаралды 3,8 М.
Next JS Project Structure: Patterns and Techniques for Success
11:23
Apple Just Integrated ChatGPT and Elon Musk is Furious!
8:08
AI Revolution
Рет қаралды 16 М.
NextJS 14 Markdown Blog: TypeScript, Tailwind, shadcn/ui, MDX, Velite,
2:55:36
Git MERGE vs REBASE
16:12
Academind
Рет қаралды 1 МЛН
When Jax'S Love For Pomni Is Prevented By Pomni'S Door 😂️
00:26