Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0a48c4e
Initial commit from Create Next App
SeveredSeikyo Apr 10, 2025
f91b7ed
first commit
SeveredSeikyo Apr 14, 2025
6318e13
test landing ready
SeveredSeikyo Apr 14, 2025
4d0e1d3
test landing ready
SeveredSeikyo Apr 14, 2025
9c22215
created production ready test 1
SeveredSeikyo Apr 14, 2025
05f5b24
changed svg icons
SeveredSeikyo Apr 15, 2025
dd1e6f8
changed svg icons
SeveredSeikyo Apr 15, 2025
7d54b1d
changed svg icons
SeveredSeikyo Apr 15, 2025
0e8a645
changed hover css
SeveredSeikyo Apr 15, 2025
a300e98
changed hover css
SeveredSeikyo Apr 15, 2025
4c27bdc
changed hover css
SeveredSeikyo Apr 15, 2025
1945ed9
added login page
SeveredSeikyo Apr 15, 2025
27ff8af
Login Page Added
SeveredSeikyo Apr 20, 2025
dbeaa45
Login Page Added
SeveredSeikyo Apr 20, 2025
ff00433
Create npm-gulp.yml
OneStepOfficial Apr 26, 2025
41c8f10
Create webpack.yml
OneStepOfficial Apr 26, 2025
efe80c3
Create nextjs.yml
OneStepOfficial Apr 26, 2025
3c860c1
Merge pull request #1 from OneStepOrg/OneStepOfficial-patch-1
OneStepOfficial May 15, 2025
b34bf20
Login Page Added
SeveredSeikyo May 18, 2025
a10b5c5
Merge branch 'main' of https://github.com/OneStepOrg/OneStepDemo
SeveredSeikyo May 18, 2025
cddfc6d
updated css
SeveredSeikyo May 19, 2025
505cfe8
updated css/login
SeveredSeikyo May 19, 2025
6b35ced
updated homepage
SeveredSeikyo May 19, 2025
c9d984d
updated homepage
SeveredSeikyo May 19, 2025
c13d32f
internships page added
Eleven-Kevin May 19, 2025
8214569
updated /internships
SeveredSeikyo May 19, 2025
18e54c1
Base Frontend Done!
SeveredSeikyo Aug 16, 2025
3b74c81
Base Frontend Done!
SeveredSeikyo Aug 16, 2025
624748c
Updated README.md
Aug 19, 2025
3b2d341
Updated README.md
Aug 19, 2025
8e20f02
Update README.md
Imabhinavvv Aug 26, 2025
c680bf6
Backend Integrated
SeveredSeikyo Oct 18, 2025
b7e57b2
changes updated
SeveredSeikyo Oct 20, 2025
1e73660
added docker files
SeveredSeikyo Oct 27, 2025
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
28 changes: 28 additions & 0 deletions .github/workflows/npm-gulp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Gulp

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install && npm start
gulp
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"IDX.aI.enableInlineCompletion": true,
"IDX.aI.enableCodebaseIndexing": true
}
225 changes: 225 additions & 0 deletions BACKEND.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# 🚀 OneStep Backend API

Welcome to the **OneStep** backend — a scalable and modular backend built with **NestJS**, **Prisma ORM**, and **JWT-based authentication**, designed to manage **Courses**, **Internships**, **Jobs**, and related user applications.

> 📌 Repository: [onestep-backend](https://github.com/your-org/onestep-backend)

---

## 📁 Tech Stack

- **Framework**: [NestJS](https://nestjs.com/)
- **ORM**: [Prisma](https://www.prisma.io/)
- **Authentication**: JWT (Bearer Token)
- **Database**: PostgreSQL (or your configured DB)
- **Package Manager**: npm

---

## ⚙️ Project Setup

### ✅ Prerequisites

- Node.js `v16+`
- PostgreSQL
- npm (v8+)

---

### 🚀 Installation & Development

```bash
# 1. Install dependencies
npm install

# 2. Copy environment variables
cp .env.example .env

# 3. Run database migrations
npx prisma migrate dev --name init

# 4. Generate Prisma client
npx prisma generate

# 5. Seed the database (optional but recommended)
npx prisma db seed

# 6. Start development server
npm run start:dev
````

---

### 📦 Production Build

```bash
# Build the project
npm run build

# Start the production server
npm start
```

---

## 🔐 Authentication

* All **Private APIs** require a valid **JWT token**.
* Pass it via the `Authorization` header:

```http
Authorization: Bearer <your-token>
```

---

## 🌐 API Base URL

```
http://localhost:5000/api
```

Set this as your global prefix in frontend or Postman configs.

---

## 📚 API Endpoints

### 1. **Auth** (`/auth`)

| Method | Endpoint | Access |
| ------ | ------------------ | ------ |
| GET | `/register` | Public |
| POST | `/login` | Public |
| PATCH | `/forgot-password` | Public |

---

### 2. **Courses** (`/courses`)

| Method | Endpoint | Access |
| ------ | ------------------------------------------------------------------- | ------- |
| POST | `/` | Private |
| GET | `/?limit=&offset=&category=&skillLevel=&providedBy=&sortBy=&order=` | Public |
| GET | `/list?filter=` | Public |
| GET | `/:id` | Public |
| PATCH | `/:id` | Private |
| DELETE | `/:id` | Private |

---

### 3. **Internships** (`/internships`)

| Method | Endpoint | Access |
| ------ | --------------------------------------------------------------------- | ------- |
| POST | `/` | Private |
| GET | `/?limit=&offset=&company=&title=&location=&workMode=&sortBy=&order=` | Public |
| GET | `/list?filter=` | Public |
| GET | `/:id` | Public |
| DELETE | `/:id` | Private |

---

### 4. **Jobs** (`/jobs`)

| Method | Endpoint | Access |
| ------ | ----------------------------------------------------------------------------- | ------- |
| POST | `/` | Private |
| GET | `/?limit=&offset=&company=&title=&location=&jobTime=&jobType=&sortBy=&order=` | Public |
| GET | `/list?filter=` | Public |
| GET | `/:id` | Public |
| DELETE | `/:id` | Private |

---

### 5. **User Courses** (`/user-courses`)

| Method | Endpoint | Access |
| ------ | ------------- | ------- |
| POST | `/:id/enroll` | Private |

---

### 6. **Internship Applications** (`/intern-applications`)

| Method | Endpoint | Access |
| ------ | ------------ | ------- |
| POST | `/:id/apply` | Private |

---

### 7. **Job Applications** (`/job-applications`)

| Method | Endpoint | Access |
| ------ | ------------ | ------- |
| POST | `/:id/apply` | Private |

---

### 8. **User** (`/users`)

| Method | Endpoint | Access |
| ------ | ------------ | ------- |
| GET | `/profile` | Private |
| PATCH | `/profile` | Private |
| GET | `/dashboard` | Private |

---

## 🔍 Query Parameters (Accepted Values)

| Query | Accepted Values |
| ------------ | ----------------------------------------------------------------------------------------- |
| `limit` | Integer (e.g., 10) |
| `offset` | Integer (e.g., 0) |
| `category` | `"Computer Science"`, `"AI Development"`, etc. (spaces as `+`) |
| `skillLevel` | `"Beginner"`, `"Intermediate"`, `"Advanced"` |
| `providedBy` | `"Government"`, `"Letsupgrade"`, `"Private"` |
| `company` | Any company name (e.g., `"TCS"`) |
| `title` | Job/Internship title (e.g., `"Software Engineer"`) |
| `location` | City or region name (e.g., `"Bangalore"`) |
| `workMode` | `"Online"`, `"Offline"`, `"Hybrid"` |
| `jobTime` | `"Full-Time"`, `"Part-Time"` |
| `jobType` | `"Field"`, `"Remote"`, `"Office"` |
| `sortBy` | Any table field (e.g., `created_at`, `title`, `company`) |
| `order` | `"ASC"` or `"DESC"` |
| `filter` | Field name (e.g., `category`, `provided_by`, `job_title`) → returns list of unique values |

---

## 🛠 Environment Variables

Copy the template and fill in your local DB and JWT values:

```bash
cp .env.example .env
```

Required variables:

* `DATABASE_URL`
* `JWT_SECRET`
* `PORT` (optional, default: `5000`)

---

## 📫 Want to Contribute?

1. Fork the repo
2. Create a feature branch
3. Commit your changes
4. Open a Pull Request

---

## 🧾 License

This project is licensed under the **MIT License**.

---

## 👥 Maintainers

* [Thanmay Sadguru Musa](https://github.com/SeveredSeikyo) - Backend Developer @ OneStep

---
Loading
Loading