Skip to content

m4rc0d3r/lightest

Repository files navigation

Lightest

Table of contents

Introduction

You can try this application in action by following this link.

About

A simple app for creating and taking tests.

Implemented functions:

  • registration
  • login
  • account activation via email (does not work in production, as the server is deployed on Render) (account activation does not affect the list of features available to the user)
  • 3 types of questions:
    • with a short answer
    • with one correct answer on the list
    • with multiple correct answers on the list
  • creating tests
  • editing your own tests
  • passing your own and other people's tests
  • viewing the results of completed tests

Technologies used

The project uses the following technologies:

  • on the backend and frontend

    • zod — library for schema-based data validation
    • ts-rest — simple cross-stack type-safety for your API, with just a sprinkle of TypeScript magic
  • only on the backend

    • Node.js — JavaScript runtime environment
    • Express — fast, unopinionated, minimalist web framework for Node.js
    • PostgreSQL — relational database management system
    • Drizzle ORM — headless TypeScript ORM with a head
    • bcrypt — password hashing library
    • jsonwebtoken — library for working with JSON web tokens
  • only on the frontend

    • Vue.js — framework for creating web user interfaces
    • Vue Router — routing library for Vue.js
    • Pinia — state management library for Vue.js
    • Axios — simple promise-based HTTP client
    • shadcn-vue — an unofficial, community-led Vue port of shadcn/ui
    • Tailwind CSS — a utility-first CSS framework

Downloading

To download the project, run the following commands:

git clone https://github.com/m4rc0d3r/lightest.git

Prerequisites for assembly and launch

To build and run the project, the following programs must be installed on your computer:

Commands to build and run the project must be executed from the project root directory.

Before building or running a project, you must specify the required environment variables.

Create an environment variables file by doing one of the following, depending on your operating system.

On Linux, run the following commands:

cp apps/server/.env.example apps/server/.env
cp apps/client/.env.example apps/client/.env

On another operating system, create copies of the .env.example files named .env.

Note: Most variables in .env files are already set up for running the project locally.

Building

First, you need to install the dependencies. This can be done using the following command:

pnpm install
pnpm --filter @lightest/server... build
pnpm --filter @lightest/client... build

Launch of the project

Backend application

To run the application, run the following commands:

cd apps/server
pnpm start:prod

Frontend application

To run the application, run the following commands:

cd apps/client
pnpm preview