Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 111 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,111 @@
# Shipyard-Interns
Tasks submission and template respository.
# Secura
Secura is a secure project management system built using **Next.js**, **Express.js**, and **SQLite**. It demonstrates **JWT-based authentication**, **role-based authorization**, and **owner-based access control** for managing projects securely.

## Features

* User Registration
* User Login
* Password Hashing with bcrypt
* JWT Authentication
* Protected Routes
* Role-Based Authorization (dev, lead, admin)
* Project Creation
* Project Viewing
* Project Updating
* Project Deletion
* Owner/Admin Access Control

## Tech Stack

* Frontend: Next.js
* Backend: Express.js
* Database: SQLite
* Authentication: JWT
* Security: bcrypt

## Authorization Rules

* Only authenticated users can access project routes.
* Project owners can update or delete their own projects.
* Admins can update or delete any project.
* Unauthorized users receive an access denied response.

## Run the Project

### Frontend

```bash
cd frontend
npm install
npm run dev
```

Frontend runs on:

```text
http://localhost:3000
```

### Backend

```bash
cd backend
npm install
npm start
```

Server runs on:

```text
http://localhost:5000
```

## Sample Users

### Admin

```json
{
"email": "emil@example.com",
"password": "123456"
}
```

### Lead

```json
{
"email": "lead@example.com",
"password": "123456"
}
```

### Developer

```json
{
"email": "dev@example.com",
"password": "123456"
}
```

## Project Structure

```text
Shipyard-Interns-js
├── backend
│ ├── src
│ └── package.json
├── frontend
│ ├── src
│ └── package.json
├── README.md
└── documentation.md
```

## Author

Emil Tom Joseph
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PORT=5000
JWT_SECRET=your_secret_key
Loading