#Is app file structure is good ?
46 messages ยท Page 1 of 1 (latest)
๐ This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
๐ต๏ธ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
โ
You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
It's great for most applications, sometimes you'll be smarter offloading some tasks to a separate server (such as compute heavy tasks)
nine times out of ten you'll be perfectly fine using route handlers, middleware, server components and server actions for what you need to do
which one should prefer ?
currently I am using app structure, and default server not express server.
I'd recommend using nextjs primarily, then use express if needed for the computationally heavy tasks
@earnest gorge use the nextjs server for basic crud operations
you mean, no need to use express
as your scale increases, you might need things like cron jobs etc.. this is when you shift to express
nextjs server is good to get you started, but it does lack features of like express in terms of every single functionality they provide
makes sense?
go t it
What we're both trying to say, is use Next, until you can't use next for what you're trying to do
^
ok, if somehing will not work out then go for express, right?
if I have no idea, in that sense
pretty much, next is good for most of what you'll need
what about file structure, is this ok. without src folder
I am using app structure with next routing, not custom
lib folder is for backend, I mean schema and backend (database)
api is for api routing
looks fine
little bit confused about the route groups, but looks fine
you can check my structure if you want examples of without src
you mean this ()
in route
for database, lib folder is ok ?
you create utils for database stuff
yup, its not in that project
@obsidian harbor @winter echo guys thanks for reply ๐
I was really confused which one to follow but now its clear
I can follow this folder structure in every project
No worries, remember nextjs dosent really care about your structure (most of the time)
so you can get creative with it
thats just what i use + most agree with
with nextjs, spend less time planning, and more time building :D
I recently started to build projects in Next.js cause its good for SEO and other things which react js is not providing. and also I am seeing it, its very good than react.
but need to learn new things
yeah
that's true, no need to make routing, just create folders and that's it
btw mark an answer whichever helped you :D
both
well you gotta chose one xD
oh, you need to make multiple choice
๐
I mark it
follow this :D
The thread gets closed by you marking as solved, but you can only mark one question as the answer haha
This question has been marked as answered! If you have any other questions, feel free to create another post
[Click here](#1228640741434200155 message)