Code Monkey home page Code Monkey logo

oru-dashboard's Introduction

Tech Stack

nextjs tailwind nodejs mongodb redis

Features

Typescript Safety
  • I have extensively used Typescript all over the project which provides static type checking to help keep the bugs and other issues to a minimum.
  • I am also using typescript to check for types and environment variables for both the client-side and server.
  • Also modified a little to throw meaningful errors.
Redis Caching
  • Redis is being used as the caching layer between the client and database for fast data retrieval which in-turn improves user experience as a whole.
  • Data is being updated in the Redis Cache everytime the user updates thier information.
  • Currently, I have set-up the expiration of the Redis Cache to expire just after 150 seconds, for ease of testing by the moderators.
Real-Time Data Update
  • I have implemented logic such that whenever user performs any action, the data will be updated to the latest version.
  • Also the UI is only being updated for the region where the update was performed, which sustains low memory usage and better performance ratio.
Single Page Application
  • The whole code follows the Single Page Application Architecture inspired by React, but with Next.js we take it to the next level by enhancing performance and also maintaining SEO.
  • The page never refreshes even when navigating to other links (due to the virtual DOM) providing a better UX to users.
Strong Authentication
  • The Authentication and Sessions in the project is being maintained by the library called Auth.js (formerly NextAuth).
  • NextAuth makes it very easy to integrate Robust Authentication Mechanism without any hassle and yet provides modification and integration of several different Adapters for syncing up the session with the desired database.
Node.js Serverless Functions
  • This Next.js code uses the API Routes provided by Next.js (which is just Node.js under the hood).
  • Although, I could have very well created a stand-alone Node.js server and hosted it separately,
  • I took the liberty to use the backend in the Next.js itself because when deploying it to vercel, vercel automatically converts the API Routes to Serverless Node.js Functions which is great.
Reusable Components
  • Instead of creating components again and again, I have used Reusable Components like Buttons and Modals that stay the same throughout the application and one doesn't need to style it every time they use the component.
Image Hosting & Optimization
  • For hosting images, I am using Supabase which uses Amazon S3 Buckets under the hood for saving the images.
  • For Optimizing the Images, I am using the integrated Image from the next/image which prefixes a lot of optimization to the image component.
Mobile Responsiveness
  • This is somewhat mobile responsive.
  • I have mainly focused on the Accessibility of the code first and then the Designing and UI.
Tailwind Styling
  • The whole project was styled using TailwindCSS.
  • The UI is clean and consistent, but I could do a lot better.
Prisma Adapter & Schema
  • In this project, I am using the Prisma Adapter to handle the queries to the database.
  • I have familiarity with both Mongo Client and Prisma Client, and to showcase my skill across various technologies and at the same time showing the simplicity of database management, I used prisma in this code.
  • You can just check one file i.e. the schema.prisma file in the root of the project and completely understand the whole database.

Difficulties Faced

  • Due to the Robust Authentication, creating several accounts is very difficult, as every account will need providers, sessions, etc.
  • Initially, persisting the Redis cache was a difficulty but I worked around it and learned a lot in the process.

Additional Images

MongoDB Database MongoDB Database

Supabase Host Supabase Host

oru-dashboard's People

Contributors

adxxtya avatar

Watchers

 avatar

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.