https://github.com/devmando/starship
A Star Wars API Coding Exercise
https://github.com/devmando/starship
Last synced: 5 months ago
JSON representation
A Star Wars API Coding Exercise
- Host: GitHub
- URL: https://github.com/devmando/starship
- Owner: DevMando
- Created: 2025-06-26T21:09:27.000Z (about 1 year ago)
- Default Branch: development
- Last Pushed: 2025-07-02T19:30:46.000Z (12 months ago)
- Last Synced: 2025-07-02T20:33:12.583Z (12 months ago)
- Language: HTML
- Size: 35.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Starship Management App
A full-stack web application built with **.NET 8**, **Blazor Server**, **Entity Framework Core**, and **SQL Server** that consumes the [SWAPI](https://swapi.info/starships) to manage a list of Star Wars starships.
This project includes:
- Authentication via Google OAuth
- CRUD functionality for Starships
- Responsive and animated UI using **Radzen** and **MudBlazor**
- Docker support using **Docker Compose** and **SQL Server in a container**
- Secrets and config values loaded from a `.env` file
I had a lot of fun styling this project! Future features may include:
- Relational data linking Pilots and Films to Starships
- Application-wide logging
- Audit history of starship changes (who changed what and when)
---
## ๐ง Features
- **Google OAuth Authentication**
Users must log in using a Google account to access the app.
- **Starship CRUD Functionality**
Create, edit, update, and delete starships. All forms are validated and styled.
- **Docker Compose Setup**
Fully containerized app and SQL Server using `docker-compose`. No manual SQL installation required.
- **Environment-Based Secrets**
All sensitive credentials and connection strings are configured via `.env` to support secure and flexible deployments.
- **Responsive UI with Animations**
A modern, sci-fi-inspired user interface using Radzen Panels and MudBlazor animations.
---
## ๐ง Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/DevMando/Starship.git
cd StarshipWebApp
```
### 2. Setup Environment Variables
Create a `.env` file at the root of the `StarshipWebApp` project based on `.env.example`.
```env
# === Database (uses Docker SQL Server container) ===
ConnectionStrings__DefaultConnection=Server=sqlserver;Database=StarshipDb;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=True;
# === Google OAuth ===
Authentication__Google__ClientId=your-google-client-id.apps.googleusercontent.com
Authentication__Google__ClientSecret=your-google-client-secret
```
> โ ๏ธ Do NOT check in your `.env` file to source control.
### 3. Run with Docker Compose (Recommended)
```bash
docker-compose up --build
```
Then navigate to [http://localhost:8080](http://localhost:8080)
This will:
- Start SQL Server in a container
- Build and launch the Blazor web app
- Automatically apply EF Core migrations and seed the database
---
## ๐ Google OAuth Setup
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project
3. Navigate to **APIs & Services โ Credentials**
4. Create **OAuth Client ID** for a **Web Application**
5. Add authorized redirect URI:
`http://localhost:8080/signin-google` *(or your deployed URL)*
6. Copy your **Client ID** and **Client Secret** into the `.env` file
---
## ๐งช Tech Stack
- .NET 8
- Blazor Server
- EF Core
- SQL Server (Docker containerized)
- Radzen Blazor Components
- MudBlazor
- Docker & Docker Compose
---
## ๐ Project Structure
- `StarshipWebApp/` โ Main Blazor project
- `.env.example` โ Sample configuration
- `docker-compose.yml` โ Compose file for local development
- `Program.cs` โ Configuration & startup logic
- `Data/` โ EF Core DbContext and models
---
## ๐ฏ Future Enhancements
- Pilot and Film relationships
- Application logging
- Starship edit history and change tracking
- Deployment pipeline
---
## โ
Status
This project is feature-complete for the coding challenge but open to future polish and enhancements.