Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

ilramdhan/nexa-sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NexaTasks - Task Management System

NexaTasks is a full-stack web application designed to help users manage their daily tasks efficiently. It features a modern, responsive frontend built with React and a robust backend powered by Go.

Features

  • User Authentication: Secure user registration and login with JWT-based authentication.
  • Task Management: Full CRUD (Create, Read, Update, Delete) functionality for tasks.
  • Interactive Dashboard: Filter tasks by status, sort by deadline, and search by title or description.
  • Responsive Design: A mobile-first design ensures a seamless experience on any device.
  • Role-Based Access Control (RBAC): Distinction between user and admin roles (backend-ready).
  • API Documentation: Detailed API documentation available via Swagger.

Technologies Used

  • Frontend:
    • React.js
    • Vite
    • TypeScript
    • Tailwind CSS
    • Shadcn/ui
    • React Router
    • Axios
  • Backend:
    • Go (Golang)
    • Fiber
    • GORM
    • PostgreSQL
    • JWT for authentication
    • Swagger for API docs
  • Database:
    • PostgreSQL

Getting Started

Prerequisites

  • Go (version 1.21 or newer)
  • Node.js (version 18 or newer)
  • PostgreSQL database running
  • Docker (optional, for containerized setup)

Setup

  1. Clone the repository:

    git clone https://github.com/your-username/nexa-sub-v2.git
    cd nexa-sub-v2
  2. Backend Setup:

    • Navigate to the backend directory: cd backend
    • Create a .env file from the example: cp .env.example .env
    • Update the .env file with your PostgreSQL database credentials.
    • Install dependencies: go mod tidy
    • Run the server:
      go run ./cmd/server/main.go
    • The backend will be running at http://localhost:8080.
    • The API documentation is available at http://localhost:8080/swagger/index.html.
  3. Frontend Setup:

    • Navigate to the frontend directory: cd ../frontend
    • Install dependencies: npm install
    • Run the development server:
      npm run dev
    • The frontend will be available at http://localhost:5173.

Automatic Database Seeding

For a better out-of-the-box experience, the backend includes an automatic database seeder.

  • How it works: When the backend server starts, it checks if the database is empty (i.e., contains no users).
  • Seeding Process: If the database is empty, the seeder will create one dummy user and 50 dummy tasks. If the database already has users, the seeder does nothing.
  • Credentials: You can use the following credentials to log in with the seeded user:
    • Username: johndoe
    • Password: password123

Database Schema

users table

Column Type Constraints
id bigint Primary Key, Auto-increment
name text
username text Unique, Not Null
password text Not Null
role text
created_at timestamptz
updated_at timestamptz

tasks table

Column Type Constraints
id bigint Primary Key, Auto-increment
user_id bigint Foreign Key to users(id)
title text Not Null
description text
status text
deadline timestamptz
created_at timestamptz
updated_at timestamptz

Screenshots

(Placeholder for screenshots of the application, e.g., Login Page, Dashboard, Mobile View)

  • Login Page
  • Dashboard
  • Task Management
  • Mobile View

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published