Skip to content

cryptus-neoxys/code-snippers

Repository files navigation

Code-Snippers

wakatime

About this project

*Save, share and create code snippets from your daily coding adventures.*

👨‍💻 Tech Stack used

  1. Serverless Architecture
    1. Frontend Frameworks
      1. NEXTjs
      2. TailwindCSS
    2. Serverless Functions
      1. NEXT's inbuilt api feature with Vercel
    3. Database & API
      1. FaunaDB
    4. Authentication Provider
      1. Auth0

🤩 Features to be added

  • Auth
  • Dark Mode 🌚
  • Code Highlighting
  • Convert code to your favourite IDE snippets

⭐ Contributions

Refer to contributing.md

▶️ Running Locally

  1. Install the app

    • Run yarn or npm i -g yarn && yarn (if you don't have yarn installed)
  2. Setup local dev env

    • Run cp .env.local.example .env.local
  3. Create a free Fauna account here at FaunaDB.

    • Create a new Database
    • Create a new collection named "snippets"
    • Create an index snippets_by_user (name) data.userId (terms)
    • Go to Security Tab and get a new server key
      • Add the server key as FAUNA_SECRET=<your_server_key> in .env.local file
  4. Create a free Auth0 account here at Auth0

    • Create a new tennant (Auth0 walks you through the process)
    • Go to applications tab and create a new application
      • Select Regular Web Applications
      • Goto you application dashboard and set env as:
        • AUTH0_ISSUER_BASE_URL as Domain.
        • AUTH0_CLIENT_ID as Client Id
        • AUTH0_CLIENT_SECRET as Client Secret
        • Set a long random string as AUTH0_SECRET.
  5. Start the local dev build

    • Run yarn dev

🔔 Credits

This project is an improvement over the code-along from James Q Quick's video.