Giter Site home page Giter Site logo

fullstack-template's Introduction

Template for fullstack app with NestJs and React

Setup

React

The react app is created with vite. It uses tailwindcss for styling and framer-motion for animations.

List of packages:

A snippet for creating styled components:

"Creates a Motion Ref Tailwind Component": {
  "prefix": "mrtc",
  "body": [
    "import { forwardRef } from 'react';",
    "",
    "import { motion } from 'framer-motion';",
    "import { tv, VariantProps } from 'tailwind-variants';",
    "",
    "const ${1:component} = tv({});",
    "",
    "export interface ${2:Component}Props",
    "  extends React.ComponentProps<typeof motion.${3:div}>,",
    "    VariantProps<typeof ${1}> {}",
    "",
    "const ${2} = forwardRef<React.ElementRef<typeof motion.${3}>, ${2}Props>(function _${2}(",
    "  { className, ...props },",
    "  ref,",
    ") {",
    "  return <motion.${3} className={${1}({ className })} {...props} ref={ref} />;",
    "});",
    "",
    "export default ${2};",
    ""
  ],
  "description": "Creates a Motion Ref Tailwind Component"
}

Configuring Environment Variables

# App
APP_URL=http://localhost:5173 # or your domain (used for emails)

# Database
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379

# Smtp
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_FROM=<Fullstack Template>
SMTP_SECURE=false # or true if you are using ssl, than you need to set SMTP_USER and SMTP_PASSWORD

# JWT (you can generate it with 'node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"')
JWT_ACCESS_TOKEN_SECRET=
JWT_REFRESH_TOKEN_SECRET=
JWT_PASSWORD_RECOVERY_TOKEN_SECRET=
JWT_ACCOUNT_CONFIRMATION_TOKEN_SECRET=

fullstack-template's People

Contributors

gui-marc avatar

Stargazers

Gonçalo Alves avatar João Costa avatar Guilherme Belchior avatar

Watchers

 avatar

fullstack-template's Issues

Add authentication

Add Complete authentication flow with:

  • Refresh Tokens
  • Login and Register endpoints
  • Account Confirmation
  • Password Recovery

Fix Docker deployment

Dockerfile is currently broken. Fix it for easy deploy on AWS, Digital Ocean, etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.