4 ms·
Next.js with Auth.js (formerly Next Auth). For a "batteries included" full stack, I'd also include Prisma and Planetscale for your "ORM" that easily stores your
by reducesuffering 4y ago
Next.js with Auth.js (formerly Next Auth). For a "batteries included" full stack, I'd also include Prisma and Planetscale for your "ORM" that easily stores your data models into a managed DB. Typescript and TailwindCSS are also highly recommended niceties.
You can deploy a template into production as simple as:
1) npx create-t3-app
2) Create Vercel account linked to your GitHub
3) Set your git remote and 'git commit && git push'
Then for DB:
4) Sign up and push button to create MySQL DB on Planetscale
5) Copy two env vars to .env
6) npx prisma db push
Then, a full stack UI can be as simple as creating a React Server Component that fetches your DB data and displays UI a la:
async function getDataFromDb() {
const data: Data[] = await prisma.data.findMany();
return data;
}
export default async function DataPage() {
const dbData = await getDataFromDb();
return (
<div className="mt-3 grid gap-5 pt-3 text-center md:grid-cols-4 lg:w-2/3">
{dbData.map((dataParam) => <Card data={dataParam}/> )}
</div>
);
}