✨ Build Your Startup

Your technical foundation is ready. Now it's time to focus on what matters most—building your business.

Introduction

Congratulations! You've reached the final stage of your ZapStart journey. You now have a production-ready codebase that would typically take months to develop from scratch. This guide will help you verify that everything is working correctly, make any final adjustments, and then shift your focus to what really matters—building your actual business.

In this tuturial, we will start off by building a simple counter app that have two counteres, a free and a pro counter (to simulate a free and a pro plan). The free counter is for all users and the pro counter is for users who have a subscription (We will make it a monthly subscription for demonstration purposes).

Prerequisites

Before proceeding, ensure you've completed all the configuration steps:

  • Fill in the JWT keys
  • Set up your MongoDB database
  • Configure Google OAuth
  • Set up email services
  • Integrate payment processing
  • Fill in the config files
  • Some of the configurations are not a must e.g. Email sending if you don't want to send emails, or Google OAuth if you are creating a waitlist app and only collect emails to test your app idea, but it's recommended to configure them. After configuring them, you should have all your environment variables set up.

    Run Frontend

    Let's run our Frontend, cd frontend and run npm install to install the dependencies then run npm run dev to start the development server, if you get an issue error about user refresh token, it's a normal issue, you can ignore it, it won't affect the app or shown to users.

    Open your browser and go to http://localhost:3001 to see the app.

    Go to your frontend/app/page.js and paste the following code:

    import { Suspense } from 'react'
    import Header from "@/components/Header";
    import Hero from "@/components/Hero";
    import PricingSection from "@/components/PricingSection";
    import FAQ from "@/components/FAQ";
    import Footer from "@/components/Footer";
    import TestimonialsMarquee from "@/components/TestimonialsMarquee";
    import FeaturesDetailsAccordion from "@/components/FeaturesDetailsAccordion";
    import CallToAction from "@/components/CallToAction";
    import { createMetadata } from '@/libs/seo/metadata';
    import TutorialSection from "@/components/TutorialSection";
    
    export const metadata = createMetadata({
      canonicalPathRelative: '/',
    });
    
    export default function Home() {
      return (
        <>
          <Suspense>
            <Header />
          </Suspense>
          <main className="overflow-hidden ">
            <Hero />
            <TutorialSection />
            <FeaturesDetailsAccordion />
            <PricingSection />
            <TestimonialsMarquee />
            <CallToAction />
            <FAQ />
          </main>
          <Footer />
        </>
      );
    }
         

    Note that the headlines and testimonials are all fake and only for the demo purposes.

    Run Backend

    Let's run our Backend, cd backend and run npm install to install the dependencies then run npm run dev to start the development server.

    You should see the following logs if everything is setup correctly:Server running on port 3000 in development mode

    Run Stripe Listen

    Let's run stripe cli to listen to the webhooks, run stripe listen --forward-to localhost:3000/api/subscription/webhook to start the stripe listen.

    leave this terminal always running when working locally.This is necessary for the webhooks to be received.

    Send Emails Upon Purchase

    Uncomment the sendEmail function in subscriptionController.js to send emails upon purchase.

    This is useful if you want to send emails to your users upon purchase, customize the email if necessary.

    Make sure you have configured your email service correctly in the email configuration file.

    Testing Counter App

    Let's say that you're interested in the free counter first and want to test the product, go to the pricing section below and click on Start for Free button for the free plan.

    You should be redirected to the login page (if you are not already logged in, otherwise your free plan will be activated once your click on the Start for Free button), login with the email (the email should be one of the test emails in google oauth), once you're logged in you should be redirected to the dashboard with pricing plans shown to you to choose from.

    Click on the Start for Free button for the free plan and you should be redirected to the dashboard with the free counter working.

    Now you should see the free counter working, and the pro counter is not available for you yet. If you reached this point, this means your Auth system and database are wokring successfully. Try to refresh the page, you should maintain access to dashboard, even if you closed the browser you should maintain access for 12 days (refresh token), but your access token expires in 15-20 minutes.

    You can also go lookup your database and see the user model, and see the user with the email you used to login, and see the free plan activated, you can also see the number of times the free counter was used etc.

    Testing Payment Processing

    Stripe integration is critical for your SaaS business. Here's how to thoroughly test it:

    Make sure you have configured your stripe keys correctly and added the pro plan price id to both frontend and backend configs, also make sure you have your stripe listen running.

    When testing, use Stripe's test credit card numbers:4242 4242 4242 4242 for successful payments and4000 0000 0000 0002 for declined payments. Use any future expiration date and any 3-digit CVC.

    Now click on the pro plan button in the pricing section, you should be redirected to the checkout page, fill in the form and click on the Pay button, you should be redirected to the dashboard with the pro counter working.

    You should receive an email to your email address that you used to login in case you uncommented the sendEmail function in subscriptionController.js.

    Click on your profile icon and click on the Manage Subscription button, you should go to the customer portal where you can manage your subscription. From there you can cancel your subscription, update your payment method, and more.

    Congratulations! You have successfully tested the payment processing.

    In production, the process works the same way, make sure you have correct configuration for production.

    Make sure to update your config files for production.

    It's Time to Build Your Startup

    Now that you understand the fundamentals of ZapStart, it's time to start building your own product. The codebase includes a comprehensive set of pre-built components that you can use to quickly create a professional-looking application:

    • Follow the Components Documentation: Browse through the components section to see all available UI elements you can use to build your landing page and application.
    • Read Component Source Files: Each component file contains detailed comments and instructions on how to implement it effectively. These insights will help you adapt them to your specific needs.
    • Explore Other Tutorials: Check out additional tutorials on SEO optimization, user authentication, and more to enhance your application's functionality.
    • Study the Codebase: The entire ZapStart codebase is thoroughly documented with comments explaining what each part does, making it easier to understand and modify according to your requirements.

    Start with a minimal viable product (MVP)

    Focus on building the core features first. You can always add more functionality later based on user feedback. The components are designed to be modular, so you can easily add or remove them as needed. To deploy your app, check out the Deployment tutorial .

    Focus on Your Business

    With your technical foundation solidly in place, it's time to shift your focus to building your business:

    Remember Why You Started

    Building a startup is challenging, but it's also incredibly rewarding. As you move forward, remember:

    • Focus on solving real problems: Your success ultimately depends on how well you solve your customers' problems.
    • Embrace iteration: Your first version doesn't need to be perfect. Get feedback early and improve continuously.
    • Celebrate small wins: Building a business is a marathon. Take time to acknowledge and celebrate your progress.

    Your technical hurdles are solved—now build your dream!

    With ZapStart, you've conquered the technical challenges that stop most founders before they start. Now you can focus on what truly matters: solving problems, delighting customers, and building a sustainable business.

    Join Our ZapStart Community (Coming Soon)

    Connect with other ZapStart users in our exclusive Discord community! Get help, share your projects, and collaborate with fellow founders.