saasykits / next-lucia-auth

This is a Next.js T3 project with authentication implemented using Lucia.
https://next-lucia.vercel.app
MIT License
350 stars 36 forks source link

More post features. #42

Open Fr3akyMurk opened 4 months ago

Fr3akyMurk commented 4 months ago

Some more post features would be nice, such as publishing (to make it visible to others) and viewing published posts from other users, this should be relatively simple.

It would be pretty neat if you or someone else on would contribute to the repository to add the capabilities of publishing posts and viewing posts, not to be confused with editing posts.

I am looking into the idea of creating a way to view posts by modifying the editor, removing the capability of editing the post and rather view it by using slugs.

I am also looking into using the "/account" page as a template for all the published posts.

Todo:

Fr3akyMurk commented 4 months ago

@iamtouha Got an idea how you want the "Public Posts" page to be accessed and how to publish a post? like a button? checkbox? switch?

Give me some ideas and i can try and create something decent.

I saw you marked this as an enhancement so it's safe to assume that you would accept such a pr? And if so, why not add it to the checklist on the readme?

iamtouha commented 4 months ago

Great! I'll write an outline for it then.

Fr3akyMurk commented 4 months ago

Awesome! If you can, sketches are more than welcome. (they're often perfect descriptions of what you want)

Kinfe123 commented 4 months ago

yeah it cool to have such thing that any one can get an onboard on the high level overview of the fullstack template.. we can make it to opt out from this post feature by adding a CLI to make it more interactive that the user can start right on the black template to not get in to all the opting out stuff. Yeah this might be a little heavy , however by assuming that any one can easly opt out from the post features that you might add , we can simply add post features so.i would love to help you here on adding sharable post features

Fr3akyMurk commented 4 months ago

yeah it cool to have such thing that any one can get an onboard on the high level overview of the fullstack template.. we can make it to opt out from this post feature by adding a CLI to make it more interactive that the user can start right on the black template to not get in to all the opting out stuff. Yeah this might be a little heavy , however by assuming that any one can easly opt out from the post features that you might add , we can simply add post features so.i would love to help you here on adding sharable post features

What do you mean opt out & CLI? The application is not finished without it and it feels unfinished, you can create posts and seemingly publish but the features for it aren't implemented. This makes it unfinished.

I didn't understand the CLI part, please elaborate.

I already got a super basic concept done for viewing posts and it works, i just need to add support to publish posts.

I can attach images here later, i am not at home.

Fr3akyMurk commented 4 months ago

My current Dev Branch has some of these changes, i cannot take pictures right now.

Hold that thought, seems like my dev brench was pulled from main instead of creating a whole new branch 😒

Fr3akyMurk commented 4 months ago

Alright so now; this branch should be perfectly up to date with main but also have additions.

Check it out for the super basic preview of how it can look like. (Be aware that currently there is no way to change published state so use a local mysql instance if possible, i will add a way to publish a bit later, right now it's midnight.)

Fr3akyMurk commented 4 months ago

@iamtouha Status? Some updates would be nice, got something written?

iamtouha commented 4 months ago

@Fr3akyMurk, apologies. I've been overwhelmed with some work lately.

The rough idea is to add a new menu item on the landing page named posts that will take users to the /posts route. The page will be similar to the one on the /dashboard route, except without action buttons. Clicking the card will take users to the /posts/[postId] route, where the post will be shown.

Fr3akyMurk commented 4 months ago

@iamtouha So basically, what i posted in my latest comment, please check it out, i can send a pr if you'd like. Although i am missing that Posts panel but if you navigate to /posts, you will see them there, granted if they're published.

Alright so now; this branch should be perfectly up to date with main but also have additions.

Check it out for the super basic preview of how it can look like. (Be aware that currently there is no way to change published state so use a local mysql instance if possible, i will add a way to publish a bit later, right now it's midnight.)

iamtouha commented 4 months ago

Yes, looks good to me. on single change- use only post preview component on post page. you don't want others to update your posts. :)

Fr3akyMurk commented 4 months ago

Yes, looks good to me. on single change- use only post preview component on post page. you don't want others to update your posts. :)

? Oh, it's just the names, the editor is not actually an editor it's the viewer, besides the editors do not permit users to change other users posts. Check out this PR for more information.

If you clone the repo and run it you will see that it runs as expected. I will however change around the names and delete the un-necessary stuff now that i got a confirmation.

Fr3akyMurk commented 4 months ago

Pagination would probably be next but i am currently (at first glance) unsure of how to use it.