Code Monkey home page Code Monkey logo

natours's Introduction

Natours - a touring website

This is a full-stack website from an Udemy course.

The original project is built with JavaScript, Express, MongoDB, and Pug templates.

I followed the course, but took the liberty to rebuild the website using the tools of my own choice - TypeScript and Next.js.

  1. The entire frontend is rebuilt using Next.js, leveraging React server/client component and TypeScript.
  2. The backend is rewritten with TypeScript, which is hosted in another repository.
  3. The database used is MongoDB, paired with Mongoose and TypeScript for better data modeling.

Why TypeScript?

I learned Rust a few months ago out of the hype around it, and fell in love with its type system and compiler driven development approach.

It was hard work navigating all the compiler warnings and errors. However, it paid off in the long run. Every step of the way, the flow of data was much more clear and variables were used with an understanding of what they can or cannot be. This had an immediate impact, significantly reducing the amount of time spent tracing back error stacks.

Table of Content

About

Features

  • Compiler-driven development with TypeScript
  • Server side rendering, leveraging Next.js and React Server Component
  • Better data modeling and validation with mongoose and TypeScript, on top of MongoDB
  • Httponly cookie and JSON Web Token are combined to delivery safer user validation.
  • Seamless payment processing with Stripe and webhooks.
  • Use the following card detail to place an order live:
  • Card number: 4242 4242 4242 4242
  • Exp: any data that later than the day you place the order
  • Name: any name

Links

Screenshots

  • Home Screen

  • Login

  • Tours page

  • Tour

  • Booking & Review

  • Checkout

  • Search

  • Setting

Built with

  • TypeScript
  • React server component
  • Next
  • Tailwind css
  • Node
  • Express
  • MongoDB & Mongoose

Author

natours's People

Contributors

llhyuan 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.