Skip to content
Merged
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
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Alexander, Robert, Dennis, Ronja, Patrik, Calle, Jimmy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
172 changes: 154 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

# 🎮 KINO-NextJS

# Deployment (Vercel)

## Live Deployment
Expand Down Expand Up @@ -47,35 +50,168 @@ The entire app (frontend, backend, and database) is now fully cloud-based and ca

# Branch Protection Rules for "main"

## Rules in Place

### 1. Pull Requests Required
![CI](https://github.com/AlexCode-dot/KINO-NextJS/actions/workflows/ci.yml/badge.svg)

- All changes to "main" must go through a pull request.
- Direct pushes to "main" are blocked.
A fullstack Next.js application for movie enthusiasts – featuring dynamic routing, server-side rendering, MongoDB integration, and a clean, component-based UI. Built with care, discipline, and a love for code and great cinema.

---

### 2. Minimum 1 Approval
## 🚀 Live Demo

👉 (https://kvikkjokk-nextjs.ekedala-services.se/)

---

- A pull request needs at least 1 approval from another team member before it can be merged.
## 🛠️ Tech Stack

### 3. Tests Must Pass
> This project leverages a modern fullstack setup optimized for performance, collaboration, and scalability.

- Pull requests will only be mergeable if the "Tests CI" workflow passes.
- Make sure your branch passes "npm test" before requesting a review.
### Frontend

### 4. Force Pushes Blocked
- **Next.js 15.3.1** – Running the latest major version with full App Router support
- **React 19** – With support for concurrent features and `use()`
- **Sass** – With scss modules- Scoped, maintainable styling per component
- **fetch API** – Handles data fetching from backend and external APIs

- Force pushing to "main" is disabled to protect commit history.
### Backend

### 5. Deletions Blocked
- **Next.js API Routes** – Backend logic under `app/api`
- **MongoDB Atlas** – Cloud-hosted NoSQL database for movies & bookings
- **Mongoose** – ODM for schema modeling (`Movie`, `Screening`, etc.)
- **OMDb API** – External source for movie metadata

- The "main" branch cannot be deleted accidentally.
### Testing

- **Jest** – Unit testing framework with custom mocks
- **jest.unstable_mockModule** – For mocking ES module imports
- **formdata-node** – Simulates `formData()` in a Node.js test environment

### Tooling & Configuration

- **Turbopack** – Next-gen bundler replacing Webpack for blazing fast dev builds
- **ESM (ECMAScript Modules)** – Clean import/export syntax
- **cross-env** – Environment variable support across platforms
- **Module Aliases (`@`)** – Shortcuts for cleaner imports (`@/lib/...`)

---

### Tips for Working with These Rules
## ✨ Modern Highlights

- Built with **Next.js 15+ App Router**
- Using **Turbopack** for ultra-fast local development
- Full support for **React 19** and future-proof features
- Modular architecture using **Server Components** and **Server Actions**
- Supports **Partial Pre-Rendering** for mixed static/dynamic content
- Clean file structure under `/app/`

---

## 🔐 Branch Protection Rules for `main`

### ✅ Enforced Rules

1. **Pull Requests Only**

- No direct commits to `main`. All changes must go through PRs.

2. **Minimum 1 Approval**

- A PR must be approved by at least one other team member before merging.

3. **CI Tests Must Pass**

- PRs are only mergeable if the `Tests CI` workflow passes (`npm test`).

4. **No Force Pushes**

- Force pushing to `main` is completely disabled.

5. **Deletion Protection**

- The `main` branch cannot be deleted.

---

## 🔄 Workflow & Collaboration

1. Create a new feature branch off `main`
2. Commit your changes and push to remote
3. Open a pull request (PR)
4. Ensure all tests pass and CI is green
5. Request a review from another developer
6. Merge only when approved

---

## 📅 Project Structure

```bash
├── lib/
│ └── db.js
├── app/
│ ├── about/
│ │ └── page.jsx
│ ├── movies/
│ │ └── [id]/
│ │ └── page.jsx
│ ├── login/
│ │ └── page.jsx
│ ├── admin/
│ │ └── page.jsx
│ ├── layout.jsx
│ └── page.jsx
├── components/
│ ├── NavMenu.jsx
│ └── MovieCard.jsx
├── public/
│ └── images/
├── styles/
│ ├── main.scss
│ └── NavMenu.module.scss
├── .env
├── jest.config.js
├── package.json
└── README.md
```

---

## 👥 Team

| Name | Role |
| --------- | ------------------- |
| Alexander | Fullstack Developer |
| Robert | Fullstack Developer |
| Dennis | Fullstack Developer |
| Ronja | Fullstack Developer |
| Patrik | Fullstack Developer |
| Calle | Fullstack Developer |
| Jimmy | Fullstack Developer |

---

## 📌 Setup & Installation

```bash
git clone https://github.com/your-username/kino-nextjs.git
cd kino-nextjs
npm install
npm run dev
```

---

## 🌐 Deployment

This project is deployed using [Vercel](https://vercel.com/). Any push to `main` triggers an automatic deployment.

🔗 Live link: [kino-nextjs.vercel.app](https://kino-nextjs.vercel.app)

---

## 📄 License

This project is licensed under the MIT License – see the [LICENSE](./LICENSE) file for details.

- Always create a feature branch from "main" before starting work.
- Push your changes and open a pull request when ready.
- Tag someone for review.
- If your PR falls behind "main", you may need to "git merge main" into your branch.
> This means you're free to use, modify, and distribute the code – even commercially – as long as you include the original copyright notice.