TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to build site with payment, subscriptions, user login, registration

72 点作者 imvetri10 个月前
I built a working concept that helps to design user interfaces and convert it into an interactive user interface. I am 11 years experinced software engineer in frontend engineering and design. When it comes to putting my tool on a site to gain customers, my head is breaking because i do not know backend.<p>I have wordpress on a domain, thinking that it will help me reach there, but im getting into panic.<p>I don&#x27;t know how to add user login, registration, subscription, paid subscription, landing pages, product pages.<p>How do you do? Or how have you done it?

43 条评论

giancarlostoro10 个月前
I recommend learning a full-stack back-end web framework that is known like Django, ASP .NET, Ruby on Rails, Laravel, to name a few.<p>There&#x27;s lots of tutorials on how to get started with them, it will be a lot of information to start.<p>If you really want to learn about the core themes each of these has:<p>* User authentication - Login &#x2F; Registration<p>* User authorization - Is this user allowed to do x, y or z?<p>* Database connectivity and query management (usually done via ORM) which handles where your data goes to, and comes from.<p>* Template engine (which you can replace if you rather an API, but I recommend for starting out, to just make a boring web app)<p>* User management<p>As for payment &#x2F; subscriptions, these are not included OOTB, but if you can get through the basics of any of these frameworks, I don&#x27;t think you&#x27;ll struggle too much to work out third party libraries that add what you need to these frameworks.<p>I started out my first web project with a micro web framework, but I had some experience in programming in general and used it and it worked out, I started with CherryPy. Basic &quot;Hello&quot; page, and gradually added pieces as I needed to add them, like database, template engine and so on. I now just use Django or ASP .NET depending on what I&#x27;m doing.<p>Django is regarded as the framework for people with deadlines, but it might not be for you, maybe Rails or ASP are more for you.<p>My recommendation is pull up a list of web frameworks that meet most of your needs, and go from there.<p>You could also look into ecommerce frameworks as well. Though I cannot personally speak to these. Laravel I&#x27;m sure has a few options for Ecommerce. You might want to go with Laravel if you want to host with PHP.
sebnun10 个月前
Beware of buying some starter kit to do the job for you. You may end up spending more time massaging the starter kit to fit your use case vs. starting from scratch on your own.<p>You mention you work with frontend engineering and design, so I&#x27;ll assume you will be more familiar with a Javascript stack.<p>The easiest way to get started these days is to use Supabase + Nextjs, using a free template like <a href="https:&#x2F;&#x2F;vercel.com&#x2F;templates&#x2F;next.js&#x2F;subscription-starter" rel="nofollow">https:&#x2F;&#x2F;vercel.com&#x2F;templates&#x2F;next.js&#x2F;subscription-starter</a> (this is a very lightweight starter, not like the commercial ones)<p>Also, consider using LemonSqueezy instead of Stripe, read about what a &quot;merchant of record&quot; is and evaluate if you need it. It can save you a tax headache down the road.
评论 #41192158 未加载
claudiulodro10 个月前
I recommend not listening to most of the suggestions here that say build out some stack -- that will be a distraction and a lot of time to spend before even getting your first customer. The most likely outcome of any startup&#x2F;project is that it will get ignored and you won&#x27;t have any customers, so don&#x27;t spend a ton of effort building out custom user&#x2F;payment stuff.<p>Since you already have a WordPress site, add WooCommerce (<a href="https:&#x2F;&#x2F;wordpress.org&#x2F;plugins&#x2F;woocommerce&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wordpress.org&#x2F;plugins&#x2F;woocommerce&#x2F;</a>). It&#x27;s a general-purpose eCommerce solution and has product pages, user registration and login, accept payments, etc. The one bit it doesn&#x27;t do out of the box is recurring monthly paid subscriptions, for which you&#x27;ll need the WooCommerce Subscriptions add-on. If your thing takes off, either this will all be &quot;good enough&quot;, or it&#x27;ll make sense to build out something custom.
评论 #41189213 未加载
hahahacorn10 个月前
Ruby on Rails, Pay Gem for Payments, Devise for Login&#x2F;Registration (Auth), a StaticPages controller for Landing&#x2F;Product pages.<p>I would then use the Litestack gem: <a href="https:&#x2F;&#x2F;github.com&#x2F;oldmoe&#x2F;litestack">https:&#x2F;&#x2F;github.com&#x2F;oldmoe&#x2F;litestack</a> + SQLite to get your DB&#x2F;Cache&#x2F;Job Queue working, deploy with Kamal, behind Cloudflare on a $5 Hetzner VM.<p>I go from idea to live app in an afternoon with this stack. I haven&#x27;t gotten around to it yet, but moving all my apps to essentially free analytics dashboard&#x2F;visibility with <a href="https:&#x2F;&#x2F;github.com&#x2F;benvinegar&#x2F;counterscale">https:&#x2F;&#x2F;github.com&#x2F;benvinegar&#x2F;counterscale</a>, Free APM with ScoutAPM.<p>If anything is ever successful, scaling is super easy. Pay for a beefier Hetzner instance, and&#x2F;or start to move your DB&#x2F;Cache&#x2F;Job Queue off of the litestack defaults with a single LOC. Move to AWS services because those are web scale or something.<p>I love this stack. It prioritizes getting shit done. Feel free to email me if you have questions.
chrsstrm10 个月前
Supabase for registration and auth, frontend framework of your choice for views, Stripe payment links for subscriptions. You&#x27;ll have to sprinkle in some Supabase Edge Functions for Stripe webhooks for your entitlements flow as well. AWS SES for transactional email. Something like Basedash for your admin panel and at this point you&#x27;re running an MVP at least.
评论 #41183259 未加载
dewey10 个月前
If you are a frontend engineer already maybe a JS based backend SaaS boilerplate project is the best starting point. Something that already comes with Stripe Checkout integration could get you up and running quickly (Like <a href="https:&#x2F;&#x2F;shipfa.st" rel="nofollow">https:&#x2F;&#x2F;shipfa.st</a> and probably others, maybe someone has more recommendations there).<p>Personally I&#x27;m using Ruby on Rails which has a lot of plugins to get up and running quickly with payments and user management. The equivalent there would be: <a href="https:&#x2F;&#x2F;jumpstartrails.com" rel="nofollow">https:&#x2F;&#x2F;jumpstartrails.com</a>
runjake10 个月前
Lots of good advice on here. <i>It would help to add what development environments and languages you are comfortable with.</i><p>You say you don&#x27;t know how to do all that, so you&#x27;re probably looking for a &quot;SaaS boilerplate&quot; for a web framework you feel comfortable with. There are many good paid and free boilerplates available.<p>Yes, you can build all of this yourself, but it will take several months or years at the point you&#x27;re at now.<p>I&#x27;m a bit ahead of you, but I&#x27;m going through this now and it turns out that understanding all of this &quot;extraneous&quot; stuff is taking way more time than it took to code up the core functionality (purpose of the app).
tanelpoder10 个月前
I use SaaSPegasus [1] to avoid reinventing all the typical features, integrations and boilerplate code. It&#x27;s based on Django. One interesting additional component that I recently discovered is PinesUI [2].<p>[1] <a href="https:&#x2F;&#x2F;www.saaspegasus.com" rel="nofollow">https:&#x2F;&#x2F;www.saaspegasus.com</a><p>[2] <a href="https:&#x2F;&#x2F;devdojo.com&#x2F;pines" rel="nofollow">https:&#x2F;&#x2F;devdojo.com&#x2F;pines</a>
fernandopj10 个月前
There&#x27;s a niche service nowadays called &quot;SaaS-as-a-Service&quot; where an entire SaaS ready to use and customize is priced to you. I didn&#x27;t use one myself but [1] is a good example.<p>[1] <a href="https:&#x2F;&#x2F;saasbold.com" rel="nofollow">https:&#x2F;&#x2F;saasbold.com</a>
评论 #41182999 未加载
评论 #41183053 未加载
评论 #41186911 未加载
评论 #41183087 未加载
lpapez10 个月前
Have a look at Laravel Breeze.<p>Has most of the things you mentioned right away, and if you need payments Laravel Cashier makes it easy as well.
hoofhearted10 个月前
I am currently working on a serverless solution that covers everything you mentioned above and is a direct alternative and upgrade to WordPress.<p>It&#x27;s built with full-stack Next.js, and the frontend is the backend, and the backend is the frontend; it&#x27;s all the same. React server components have eliminated the need to separate the frontend from the backend into separate domains, and the frontend essentially securely talks directly to the database which eliminates extra network round trips and vulnerable backend API routes.<p>Built with Next.js, Postgres, TipTap, Tailwind, and Auth.js.<p>Compatible with Vercel, Neon, Supabase, Firebase, Cloudflare R2, etc.<p>What do you think? Is this a solution you might consider over your current WordPress domain?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;elegantframework&#x2F;elegant-cli&#x2F;tree&#x2F;v4.x&#x2F;packages&#x2F;elegant">https:&#x2F;&#x2F;github.com&#x2F;elegantframework&#x2F;elegant-cli&#x2F;tree&#x2F;v4.x&#x2F;pa...</a>
PaulHoule10 个月前
I wrote a &quot;user management system&quot; in PHP back in 2000 because I thought &quot;user management&quot; was dark matter for almost all web sites: you don&#x27;t really want to write email verification, password reset forms and all that stuff but it&#x27;s the kind of &quot;non-functional&quot; requirement which will leave your web site &quot;non-functional&quot; if you don&#x27;t do it.<p>I used the software for a few projects for myself, customers and employers. It was open source, but the industry couldn&#x27;t give a damn, turned out the missing feature was &quot;depends on a third party auth service that is someday going to get acquired and shut down&quot;. Auth frameworks like that proliferated like mushrooms after the rain around 2013 and all of a sudden people were interested.<p>(Oddly back then I was looking at various &quot;API management&quot; products that a number of &quot;want-to-have&quot; features but that all lacked the one feature you needed to make a business, which was integration with a payment gateway.)<p>I think the basic advice in 2024 is the same as it was in 2000 which is store user records in a relational or document database, encrypt your passwords like an OS does, use signed cookies for authentication (ignore the anti-JWT splogs that a certain vendor funds), etc. I think today it would not be unreasonable to take a &quot;microservice&quot; kind of approach where auth is handled by some self-contained system through an API but practically you might want to be able to join stuff against your user table.<p>However, a lot of the complexity of a good auth system is tied up to the UX for both the visitors and administrators. I&#x27;ve seen onboarding completion rates increase from 22% to 85% as a result of improving each and every step. Administrators deserve a great interface for managing users. Even if a &quot;microservice&quot; had a good internal API so much of quality, security and all that depend on the UI the system exposes and I think that is just as important to reuse as the inner logic.
评论 #41183137 未加载
评论 #41183219 未加载
koeng10 个月前
I have a go monolith, htmx for dynamic pages, and SQLite to back it. I really tried to find something for user login &#x2F; auth &#x2F; forgot password, but ended up just implementing it myself. Way easier than figuring out APIs and such to integrate with my pages.
评论 #41183159 未加载
gregoryjjb10 个月前
This is a very broad question, but the most straightforward answer is to use a popular full stack framework like Ruby on Rails. It&#x27;ll give you most of what you need out of the box, and there&#x27;s 3rd party packages for the rest.
Proziam10 个月前
I suggest the following stack:<p>Supabase - User Auth &amp; Database<p>Stripe - Subscriptions &amp; Payments<p>React or Svelte - Building landing and product pages<p>These tools are extremely popular and well documented, so anything you get stuck on is bound to be readily searchable online. If you&#x27;ve already got over a decade of front-end work experience I&#x27;d say just spin up Sveltekit or NextJS and follow along with a guide like this one:<p>Supabase Auth - <a href="https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;auth&#x2F;server-side&#x2F;sveltekit">https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;auth&#x2F;server-side&#x2F;sveltekit</a>
ansanabria10 个月前
Your best bet would be to use something like Supabase, which simplifies all the backend stuff. Get deep into the docs and use Claude to figure stuff out.
评论 #41182951 未加载
alain3410 个月前
I have built a boilerplate for my own project using what I am proficient on. You can find it at <a href="https:&#x2F;&#x2F;github.com&#x2F;aoware&#x2F;slim-saas-boilerplate">https:&#x2F;&#x2F;github.com&#x2F;aoware&#x2F;slim-saas-boilerplate</a><p>There is a demo at <a href="https:&#x2F;&#x2F;boilerplate.aoware.co.uk" rel="nofollow">https:&#x2F;&#x2F;boilerplate.aoware.co.uk</a><p>The reason for creating this boilerplate is because I needed to have a starting point that include account &#x2F; user &#x2F; subscription &#x2F; pricing &#x2F; payment for a number of B2B and B2C saas initiatives.<p>It did allow me to spin fairly quickly Memories (a photo &#x2F; video storage to share with family ) <a href="https:&#x2F;&#x2F;m.emori.es&#x2F;" rel="nofollow">https:&#x2F;&#x2F;m.emori.es&#x2F;</a><p>In addition, I used the same boilerplate to reskin an old saas of mine. It is not live yet, but you can see the new version here <a href="https:&#x2F;&#x2F;test.bankaccountchecker.com" rel="nofollow">https:&#x2F;&#x2F;test.bankaccountchecker.com</a>
gabriel_dev10 个月前
Probably the easiest would be starting off with Firebase for the overall backend and user management. Stripe for payments including recurring. However, if the project will take off, then you&#x27;d be dealing with a dilemma: how to switch to something more mature friendly Like, say, Django or others. I use Django as the main backend framework (sometimes for full stack).
j4510 个月前
Been building subscription and billing logic for at least 15 y.<p>Boilerplate code can help.. learning from others is important.<p>Have you checked both videos on youtube and source code on Github?<p>Like you have said this is more about how to think about it and break it down before any technology issue.<p>My reccomendation is starting with a clean sheet of paper and learning the concepts in this area, how they could connect to help shine a light in the right direction.<p>You are asking two questions, the first about the customer and their subscription, and then the difference between landing and product pages is another. They are related but separate. Some people like feature flags to help handle it, but it might not be needed at all.<p>This becomes a bottleneck for startups, because the billing and account logic can hinder shipping code and features. So thinking about it from the start even a little more can go a long way.<p>You have two options, build, or buy and in both cases it&#x27;s important to understand how it all works. Some people may or may not want to grandfather features and plans, for example.<p>1) Done for you: SaaS boilerplate can be useful, but it&#x27;s important to understand the depth of the billing integration.<p>2) Do it yourself: I also use a series of tables in any database schema that has worked well for me in most situations, you have the right idea. It is a reflection of the reading and learning I have done and combining it into one.<p>There is a basic approach that if done well can grow to handle more complexity, and if you don&#x27;t care, it&#x27;s easy enough to include a few more tables.<p>Using the concepts you listed above, you can put together a rough sentence of what could be entities &#x2F; tables in a database. Some may merge together, or need support tables, having the core story is important first.<p>A [Customer] has a [Paid Subscription], to a [Plan (Subscription)], which grants them [Permissions] to login with an [Account] to see certain [Plan Features] on the [Product Pages].<p>This is a basic example for your case, but it will click if you catch a few youtube videos that work for you to learn. After you&#x27;ve watched a few, Happy to chat here or connect offline to walk through.<p>To me, this is one of the single most important things a SaaS &#x2F; Startup can do, it bakes flexibility into the bread.
评论 #41187034 未加载
WithinReason10 个月前
As someone who is not a web dev I find it amusing that there are 4 answers all saying something different.
评论 #41183010 未加载
评论 #41183111 未加载
评论 #41183038 未加载
eiiot10 个月前
There are basically three parts to this question, all of which can be chosen independently and then fit together.<p>First you choose a frontend (and often backend) framework to actually build the pages, like Next.js, Svelte, Laravel, etc.<p>Then, you can choose an auth solution like Clerk, auth0, NextAuth, Supabase, etc. Most of these products work with a wide variety of frameworks. Some of the frameworks (like Laravel) also have an auth framework built in.<p>For payments, you technically have choices but I would just use stripe.
fragmede10 个月前
Might take a look at AWS&#x27;s Amplify framework which includes a bunch of free tier and libraries. Cognito is particularly useful for just getting user auth done.
tobiasbischoff9 个月前
Have you tried a ready made solution like payhip? Might be worth it to save you from all the trouble.
jvaqueiro10 个月前
There&#x27;s also the option of working with an agency or freelancer. Since you know about frontend and design, you might be able to work out something for a reasonable price.<p>For these types of projects (in a validation state) I recommend using Stripe subscriptions, they have incredible low code tools that will handle all the heavy stuff. You&#x27;ll save a lot of time.<p>Disclaimer. I run my own software studio.
评论 #41183170 未加载
issa10 个月前
I think the best advice is use something you are comfortable with. But the second best advice is hopefully that isn&#x27;t WordPress. Yes, you can do it in WP, but you would have so many more options if you picked something like Angular or React as your frontend. Then outsource auth and payments (auth0 and Stripe, for example) and that will take you pretty far. Good luck!
iceburgcrm10 个月前
You can fork my open source sass<p><a href="https:&#x2F;&#x2F;github.com&#x2F;iceburgcrm&#x2F;iceburgsaas">https:&#x2F;&#x2F;github.com&#x2F;iceburgcrm&#x2F;iceburgsaas</a><p>Here is the frontend: iceburgcrm.com<p>Based on Laravel&#x2F;Breeze<p>Or you can use a starter kit <a href="https:&#x2F;&#x2F;github.com&#x2F;thedevdojo&#x2F;wave">https:&#x2F;&#x2F;github.com&#x2F;thedevdojo&#x2F;wave</a>
sudohackthenews10 个月前
I really like using Supabase for auth- they handle the database and the oauth for you
jslakro10 个月前
Boilerplates:<p><a href="https:&#x2F;&#x2F;boilerplatelist.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;boilerplatelist.com&#x2F;</a> <a href="https:&#x2F;&#x2F;boilermat.es&#x2F;" rel="nofollow">https:&#x2F;&#x2F;boilermat.es&#x2F;</a>
is_true10 个月前
Does anyone know if there&#x27;s anything opensource similar to what rapidapi does?<p>I&#x27;m interested mostly in managing access to some APIs we run that aren&#x27;t in the same infra and different languages also.<p>Thanks.
RangerScience10 个月前
Ruby on Rails with Devise and Stripe pretty much does this out of the box.
sidcool10 个月前
Rails has all the great backend stuff. Frontend could be react and next
m4jor10110 个月前
Checkout few CRUD templates listed here, you can find both free&#x2F;open source as well as paid options based on your usecase and tech stack: techajob.com
mrhichem10 个月前
ditch wordpress. use laravel
评论 #41182920 未加载
kylegawley10 个月前
Don&#x27;t do it, use a starter kit like usegravity.app and save yourself the time and headache
bhag206610 个月前
ghost.org - start there and build something custom if the concept shows signs it&#x27;s working
djaouen10 个月前
Elixir + Phoenix + LiveView. Or, if Python is more your jam, Django has built in authentication.
评论 #41183041 未加载
smarri10 个月前
I&#x27;m in a similar position to you. I&#x27;m trying to do this with Firebase.
2-3-7-43-180710 个月前
Start with AWS Cognito and then just go from there.
akskakskaksk10 个月前
I recently used kobble.io to do this quite easily
ddgflorida10 个月前
Find plugins for wordpress.
dmje10 个月前
Laravel or WordPress I’d say
bilater10 个月前
Supabase + Lemon Squeezy
brudgers10 个月前
This sounds like a build versus buy problem. The description strongly suggests buying.<p>You are trying to start a business. The cost of buying what you need can be reflected in the price. Your customers will pay for the cost of your store and get what they pay for.<p>Running a business will provide you ample other opportunities for you to pay the dumb tax. Good luck.