I believe this is the correct way to re-map everything so concerns are properly separated:
+server.js
should probably be used for authentication globally?+page.server.js
should fetch the thread/forum details by id and then fetch all of the thread/post details matching the forum/thread id and return them as props.+page.js
should handle the user's interactions with the page.+page.svelte
should handle the rendering of the page, using the props from +page.server.js and the user's interactions from+page.js
.
- is it okay/good to keep my store files as is, with each CRUD action centralized?
- do i need to simplify my current store system?
- look into implementing svelte tip-tap for rich text.
- set character limit to 3 for free tier.
- add archive column to threads table so users can archive finished threads + admin can auto archive stale threads
- Move shared js into a lib folder and update to use $/lib imports https://kit.svelte.dev/docs/modules#$lib
Everything you need to build a Svelte project, powered by create-svelte
.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.