Vic 🌮 Profile picture
Mar 4 10 tweets 4 min read
How do you build a fullstack app from scratch? I see this question here all the time.

The answer is something like:
- next.js
- python
- sagemaker
- tailwindcss
- C++
- typescript
- java
- sql

Makes 0 sense.

Here's a guide on building a fullstack JavaScript app in 15 mins 🧵
We're going to use Remix for this project.

Get started with:
❯ npx create-remix@latest

This will set up a directory with code and run npm install for you.

Start the site to see it:
❯ npm run dev
Idea: We're going to track our water and coffee drunk in a database.

Set up Prisma so we can talk to the db. Prisma is a database client for TypeScript and Node.

I install it, then add a new model. Now I can push my new table to SQLite. We can switch to something else later.
Before we can access our database from code, we also need to create a file that helps us make a connection to Prisma.

Add a file named app/lib/db.server.ts.

The .server.ts part of the filename is pretty cool. It ensures that Remix will never bundle it and send it to clients.
Another note here about Prisma. It comes with an inbuilt visual data browser for you to look at your database.

Try it out:
❯ npx prisma studio

I used the studio to manually add a few records of the liquids I've drunk today. 1 x ☕️, 2 x 💧
Now we are finally going to connect our app to the database! Drumroll 🥁 please.

Open up app/routes/index.tsx that the Remix create made for you and delete everything in it. Let's replace it with this instead.

Reload your site and behold, your beverage consumption ala Wordle.
We need to enter data into the database somehow, so next let's work on a form to submit what we are currently drinking.

Forms in Remix are super simple. No need to build an API or anything.

First we create a form, and then we create the form handler.
Let's try it out! And there we go. 🎇💥

Okay Twitter video upload is broken so I have to do a screenshot. I promise it works.
Twitter issue is killing me 😂 I'll convert this tutorial to a detailed post with code samples on my blog soon, along with how to deploy it to production. If that is something you're interested in, follow me and I'll post about it when it's ready.

Stay hydrated, my friends! 🌊
I haven't written the article yet but here's the code if that's helpful to someone. github.com/needcaffeine/f…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Vic 🌮

Vic 🌮 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @VicVijayakumar

Mar 3
💯 You can tell an engineer why something won’t work based on your experience but they are far more likely to retain a lived experience.

My thing in those situations is to say “let’s see what happens if we try that approach”.

Don’t say “do it & you’ll see why it’s wrong”.
It’s also entirely possible that their suggestion will work, and you the senior engineer is going to learn something invaluable.
I am not trying to infantilize anyone here, but those of us with kids immediately see the parallels.

My 7yo is riding her bike. I say don’t slam the brakes when you’re going over dry leaves, coz physics. She does it anyway, gets a bloody knee.

She’ll retain this experience.
Read 6 tweets
Jan 6
The most valuable skill for a junior dev to learn is "communication".

I've been interviewing engineers for 15+ years, and maybe this advice will seem obvious.

A quick thread of great communication in an interview to help you land that software dev role.
The interview intro

Your interviewer will intro themselves and rundown how the next 30+ mins will be spent.

When they ask you to introduce yourself, remember that this is part of the interview!

You're not a prisoner of war, don't just state your name and rank, and go quiet.
Practice your intro beforehand

When an interviewer says tell me a little bit about yourself, please tell them about yourself.

Tell them where you're from, what you currently do, what kind of things interest you.
Read 12 tweets
Nov 19, 2021
Casually browsing SaaS startups on @microacquire this morning to see if I want to buy one in the 5-10K range that has a low but steady MRR.

These are validated ideas with momentum and can shave several months to years off of your early founder journey.

Anyone else into this?
There's more interest in this than I expected. Here are a few other marketplaces I browse from time to time:

Flippa lists domain names, iOS/Android apps, blogs, ecommerce sites, SaaS, Amazon FBA.
I am also a *huge* fan of exchangemarketplace.com, which is run by Shopify, and no surprise, is a place to buy and sell Shopify businesses only.

You get a TON of verified information about a store's revenue, profit, profit margin, and sales.
Read 5 tweets
Nov 18, 2021
Weirdest use of Airtable today?

✨ I made a no-code feature flag system with Airtable and am using that to hide or display sections on a Next.js site. ✨

That's one way to help a client who can't decide when exactly something should go live on their site. 🤷🏾‍♂️
Here's how I did it. First I have a table that looks something like this. This is what the client sees when they edit the "Features" table (base, in Airtable lingo).
Airtable gives you an automatic API for each base. In the case of the Features base, I click into the API documentation and see that it looks like this.

This is a test base, I am not worried that you see my base ID in the screenshot.
Read 7 tweets
Nov 17, 2021
Coming to @netflix next Halloween starring Vanessa Hudgens, the newest film in the series-

The Princess Switch: Princess Witch 👸🏽🧙‍♀️
@netflix Vanessa Hudgens has a déjà vu when she sees the same exact cat walk by twice. 🐈‍⬛🐈‍⬛

The Princess Switch: Matrix Glitch
@netflix It's going to be a warm weekend! The kingdom is ready to go out to the ballgame and get popcorn and hotdogs. 🍿⚾️🌭

The Princess Switch: Perfect Pitch
Read 6 tweets
Mar 2, 2021
If you are building a SaaS from scratch, have your Users belong to Teams, and attach billing information to the Team not User. While you're there, create a Membership model to be the join table between User/Team and assign a role to the User like Owner, Admin, or Readonly.
This signals that your app is business-friendly. It allows you to assign limits and features at the Team level. It allows for users to ask for their accounts to be deleted without it affecting the billing status of the entire team. It allows a team to kill a teammate's account.
"but I'm building a b2c, do I need teams?"

Personal finance tool: user wants spouse to see their budget

Notetaking tool: user wants to share notes with family

Videogame recc app: user wants girlfriend to add their games to library

Preschool app: grandma wants to pay tuition
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(