8 Commits

20 changed files with 971 additions and 629 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "api", "name": "api",
"version": "1.0.0", "version": "1.1.0",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,
@@ -20,25 +20,24 @@
"test:e2e": "jest --config ./test/jest-e2e.json" "test:e2e": "jest --config ./test/jest-e2e.json"
}, },
"dependencies": { "dependencies": {
"@azure/functions": "^1.0.3",
"@nestjs/axios": "^4.0.0", "@nestjs/axios": "^4.0.0",
"@nestjs/azure-func-http": "^0.10.0", "@nestjs/azure-func-http": "^0.10.0",
"@nestjs/common": "^10.0.0", "@nestjs/common": "^11.0.11",
"@nestjs/config": "^4.0.0", "@nestjs/config": "^4.0.1",
"@nestjs/core": "^10.0.0", "@nestjs/core": "^11.0.11",
"@nestjs/platform-express": "^10.0.0", "@nestjs/platform-express": "^11.0.11",
"@noahspan/azure-database": "^3.1.2", "@noahspan/azure-database": "^3.1.2",
"@noahspan/noahspan-modules": "^1.0.0", "@noahspan/noahspan-modules": "^1.1.5",
"axios": "^1.7.9", "axios": "^1.7.9",
"reflect-metadata": "^0.2.2", "reflect-metadata": "^0.2.2",
"rxjs": "^7.8.2", "rxjs": "7.8.2",
"uuid": "^11.0.5" "uuid": "^11.0.5"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/schematics": "^19.1.4", "@angular-devkit/schematics": "^19.1.4",
"@nestjs/cli": "^10.0.0", "@nestjs/cli": "^11.0.5",
"@nestjs/schematics": "^10.0.0", "@nestjs/schematics": "^11.0.2",
"@nestjs/testing": "^10.0.0", "@nestjs/testing": "^11.0.11",
"@schematics/angular": "^19.1.4", "@schematics/angular": "^19.1.4",
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"@types/jest": "^29.5.2", "@types/jest": "^29.5.2",

View File

@@ -1,8 +1,8 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { APP_FILTER, APP_GUARD } from '@nestjs/core'; import { APP_FILTER } from '@nestjs/core';
import { HttpExceptionFilter } from './filters/http-exception.filter'; import { HttpExceptionFilter } from './filters/http-exception.filter';
import { ProjectModule } from './project/project.module'; import { ProjectModule } from './project/project.module';
import { AuthGuard, AuthModule, UserModule } from '@noahspan/noahspan-modules' import { AuthModule, UserModule } from '@noahspan/noahspan-modules'
import { ConfigModule, ConfigService } from '@nestjs/config'; import { ConfigModule, ConfigService } from '@nestjs/config';
import configuration from './config/configuration'; import configuration from './config/configuration';
@@ -39,10 +39,6 @@ import configuration from './config/configuration';
{ {
provide: APP_FILTER, provide: APP_FILTER,
useClass: HttpExceptionFilter useClass: HttpExceptionFilter
},
{
provide: APP_GUARD,
useClass: AuthGuard
} }
] ]
}) })

3
api/src/index.css Normal file
View File

@@ -0,0 +1,3 @@
body {
background-color: #f2f2f2;
}

View File

@@ -12,13 +12,14 @@ import {
import { ProjectDto } from './project.dto'; import { ProjectDto } from './project.dto';
import { Project } from './project.entity'; import { Project } from './project.entity';
import { ProjectService } from './project.service'; import { ProjectService } from './project.service';
import { CustomError, Public } from '@noahspan/noahspan-modules'; import { AuthGuard, CustomError, Public } from '@noahspan/noahspan-modules';
@Controller('projects') @Controller('projects')
export class ProjectController { export class ProjectController {
constructor(private readonly projectService: ProjectService) {} constructor(private readonly projectService: ProjectService) {}
@Get(':partitionKey/:rowKey') @Get(':partitionKey/:rowKey')
@UseGuards(AuthGuard)
async find( async find(
@Param('partitionKey') partitionKey: string, @Param('partitionKey') partitionKey: string,
@Param('rowKey') rowKey: string @Param('rowKey') rowKey: string
@@ -32,12 +33,12 @@ export class ProjectController {
} }
} }
@Public()
@Get() @Get()
async findAll() { async findAll() {
try { try {
return await this.projectService.findAll(); return await this.projectService.findAll();
} catch (error) { } catch (error) {
console.log(error)
const customError = error as CustomError; const customError = error as CustomError;
throw new HttpException(customError.message, customError.statusCode); throw new HttpException(customError.message, customError.statusCode);
@@ -45,6 +46,7 @@ export class ProjectController {
} }
@Post() @Post()
@UseGuards(AuthGuard)
async create(@Body() projectDto: ProjectDto) { async create(@Body() projectDto: ProjectDto) {
try { try {
const project = new Project(); const project = new Project();
@@ -60,6 +62,7 @@ export class ProjectController {
} }
@Put(':partitionKey/:rowKey') @Put(':partitionKey/:rowKey')
@UseGuards(AuthGuard)
async update( async update(
@Param('partitionKey') partitionKey: string, @Param('partitionKey') partitionKey: string,
@Param('rowKey') rowKey: string, @Param('rowKey') rowKey: string,
@@ -79,6 +82,7 @@ export class ProjectController {
} }
@Delete(':partitionKey/:rowKey') @Delete(':partitionKey/:rowKey')
@UseGuards(AuthGuard)
async delete( async delete(
@Param('partitionKey') partitionKey: string, @Param('partitionKey') partitionKey: string,
@Param('rowKey') rowKey: string @Param('rowKey') rowKey: string

View File

@@ -1,7 +1,9 @@
import { EntityString } from '@noahspan/azure-database';
export class Project { export class Project {
partitionKey: string; @EntityString() partitionKey: string;
rowKey: string; @EntityString() rowKey: string;
displayName: string; @EntityString() displayName: string;
icon: string; @EntityString() icon: string;
summary: string; @EntityString() summary: string;
} }

View File

@@ -17,7 +17,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
inject: [ConfigService] inject: [ConfigService]
}), }),
AzureTableStorageModule.forFeature(Project, { AzureTableStorageModule.forFeature(Project, {
createTableIfNotExists: true, createTableIfNotExists: false,
table: 'projects' table: 'projects'
}), }),
], ],

View File

@@ -1,7 +1,6 @@
import { InjectRepository, Repository } from '@noahspan/azure-database'; import { InjectRepository, Repository } from '@noahspan/azure-database';
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Project } from './project.entity'; import { Project } from './project.entity';
import { v4 as uuidv4 } from 'uuid';
@Injectable() @Injectable()
export class ProjectService { export class ProjectService {

View File

@@ -1,7 +1,7 @@
{ {
"name": "app", "name": "app",
"private": true, "private": true,
"version": "1.0.0", "version": "1.1.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -13,7 +13,7 @@
"@azure/msal-browser": "^4.2.1", "@azure/msal-browser": "^4.2.1",
"@azure/msal-react": "^3.0.4", "@azure/msal-react": "^3.0.4",
"@microsoft/microsoft-graph-types": "^2.40.0", "@microsoft/microsoft-graph-types": "^2.40.0",
"@noahspan/noahspan-components": "^1.3.1", "@noahspan/noahspan-components": "^1.4.0",
"axios": "^1.7.9", "axios": "^1.7.9",
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0", "react-dom": "^19.0.0",

View File

@@ -47,7 +47,6 @@ const ProjectForm = ({ isDrawerOpen, mode, onOpenClose, projectId }: ProjectForm
}; };
const onSubmit = async (data: unknown) => { const onSubmit = async (data: unknown) => {
console.log(data)
try { try {
dispatch({ type: 'SET_IS_LOADING', payload: true }); dispatch({ type: 'SET_IS_LOADING', payload: true });

View File

@@ -37,12 +37,14 @@ const Projects = () => {
`api/projects`, `api/projects`,
); );
const projects: Project[] = response.data; const projects: Project[] = response.data;
console.log(projects);
projects.sort((a, b) => Number(a.order) - Number(b.order)) projects.sort((a, b) => Number(a.order) - Number(b.order))
return projects; return projects;
} catch (error) { } catch (error) {
throw new Error('broken'); const axiosError = error as AxiosError;
throw new Error(axiosError.message);
} }
}; };

View File

@@ -69,7 +69,6 @@ const SiteNav: React.FC<unknown> = () => {
return imageUrl; return imageUrl;
} catch (error) { } catch (error) {
console.log(error);
throw new Error(); throw new Error();
} }
}; };
@@ -94,7 +93,6 @@ const SiteNav: React.FC<unknown> = () => {
const accessToken: string = await getAccessToken(); const accessToken: string = await getAccessToken();
const userProfile = await getUserProfile(accessToken); const userProfile = await getUserProfile(accessToken);
const userPhoto = await getUserPhoto(accessToken); const userPhoto = await getUserPhoto(accessToken);
console.log(userPhoto)
setUserPhoto(userPhoto); setUserPhoto(userPhoto);

View File

@@ -0,0 +1,3 @@
body {
background-color: #f2f2f2;
}

View File

@@ -6,6 +6,7 @@ import { BrowserRouter } from 'react-router-dom';
import { AuthenticationResult, EventMessage, EventType, PublicClientApplication } from '@azure/msal-browser'; import { AuthenticationResult, EventMessage, EventType, PublicClientApplication } from '@azure/msal-browser';
import { msalConfig } from './auth/msalConfig.ts'; import { msalConfig } from './auth/msalConfig.ts';
import AppContextProvider from './context/appContext/AppContextProvider.tsx'; import AppContextProvider from './context/appContext/AppContextProvider.tsx';
import './index.css';
const msalInstance: PublicClientApplication = new PublicClientApplication(msalConfig); const msalInstance: PublicClientApplication = new PublicClientApplication(msalConfig);

View File

@@ -1,212 +0,0 @@
{
"experiences": [
{
"jobTitle": "Senior Software Engineer",
"company": "Sensonix, Inc.",
"location": "Plymouth, Minnesota",
"startDate": "April 2023",
"endDate": "Present",
"details": null
},
{
"jobTitle": "Senior Software Engineer",
"company": "Amano McGann, Inc.",
"location": "Roseville, Minnesota",
"startDate": "July 2022",
"endDate": "April 2023",
"details": null
},
{
"jobTitle": "Senior Software Engineer",
"company": "Optum",
"location": "Eden Prairie, Minnesota",
"startDate": "March 2021",
"endDate": "June 2022",
"details": null
},
{
"jobTitle": "Senior Software Engineer",
"company": "Target",
"location": "Minneapolis, Minnesota",
"startDate": "December 2018",
"endDate": "February 2021",
"details": null
},
{
"jobTitle": "Developer, Business Systems",
"company": "Minnesota Twins",
"location": "Minneapolis, Minnesota",
"startDate": "February 2017",
"endDate": "December 2018",
"details": null
},
{
"jobTitle": "SharePoint Administrator/Developer",
"company": "Minnesota Judicial Branch",
"location": "Saint Paul, Minnesota",
"startDate": "January 2016",
"endDate": "February 2017",
"details": null
},
{
"jobTitle": "Consultant",
"company": "Magenic Technologies",
"location": "Saint Louis Park, Minnesota",
"startDate": "August 2011",
"endDate": "January 2016",
"details": null
}
],
"education": [
{
"school": "Metropolitan State University",
"location": "Saint Paul, Minnesota",
"degree": "Bachelor of Arts",
"fieldOfStudy": "Technical Communication"
},
{
"school": "Century College",
"location": "White Bear Lake, Minnesota",
"degree": "Associate of Arts",
"fieldOfStudy": "Liberal Arts"
}
],
"about": {
"details": "\\# This is some markdown.",
"summary": null
},
"intro": {
"firstName": "Noah",
"lastName": "Spannbauer",
"photoUrl": null,
"title": "Senior Software Engineer",
"location": "Minneapolis, Minnesota, United States"
},
"skills": [
{
"category": "Experienced",
"group": "Agile Methodologies",
"skills": [
"Scrum"
]
},
{
"category": "Experienced",
"group": "Containerization",
"skills": [
"Docker",
"Kubernetes",
"Helm"
]
},
{
"category": "Experienced",
"group": "Continuous Integration and Continuous Delivery",
"skills": [
"GitHub Actions",
"Argo CD"
]
},
{
"category": "Experienced",
"group": "Database",
"skills": [
"PostgreSQL"
]
},
{
"category": "Experienced",
"group": "Front-End Web Development",
"skills": [
"React",
"Node.js"
]
},
{
"category": "Experienced",
"group": "Infrastructure as Code",
"skills": [
"Terraform"
]
},
{
"category": "Experienced",
"group": "Messaging",
"skills": [
"RabbitMQ"
]
},
{
"category": "Experienced",
"group": "Programming Languages",
"skills": [
"JavaScript",
"Typescript"
]
},
{
"category": "Experienced",
"group": "Test Automation",
"skills": [
"Cucumber",
"Gherkin",
"Jest",
"Playwright"
]
},
{
"category": "Experienced",
"group": "Cloud",
"skills": [
"Amazon Web Services (AWS)"
]
},
{
"category": "Familiar",
"group": "Cloud",
"skills": [
"Azure"
]
},
{
"category": "Familiar",
"group": "Continuous Integration and Continuous Delivery",
"skills": [
"Azure DevOps",
"Drone",
"Vela"
]
},
{
"category": "Familiar",
"group": "Database",
"skills": [
"MongoDB",
"SQL Server"
]
},
{
"category": "Familiar",
"group": "Messaging",
"skills": [
"Khafka"
]
},
{
"category": "Familiar",
"group": "Programming Languages",
"skills": [
"C#",
"Powershell"
]
},
{
"category": "Familiar",
"group": "Test Automation",
"skills": [
"Cypress"
]
}
],
"___mb_schema": "/.mattrbld/schemas/Profile.json"
}

View File

View File

@@ -1,23 +0,0 @@
{
"projects": [
{
"repoName": "noahspan-components",
"title": "Components (React + Storybook)",
"iconName": "fa-puzzle-piece",
"summary": "A component library with custom React components, extended components from Material UI, and a subset of Font Awesome icons."
},
{
"repoName": "noahspan-flying",
"title": "Flying (React + Nest.js)",
"iconName": "fa-plane",
"summary": "A pilot logbook for logging flight hours."
},
{
"repoName": "noahspan-modules",
"title": "Modules (Nest.js)",
"iconName": "fa-gear",
"summary": "A library of custom modules for projects using Nest.js."
}
],
"___mb_schema": "/.mattrbld/schemas/Projects.json"
}

View File

@@ -2,13 +2,15 @@ version: '3.8'
services: services:
azurite: azurite:
container_name: azurite container_name: azurite-root
image: mcr.microsoft.com/azure-storage/azurite:3.33.0 image: mcr.microsoft.com/azure-storage/azurite:3.33.0
ports: ports:
- '10000:10000' - '10000:10000'
- '10001:10001' - '10001:10001'
- '10002:10002' - '10002:10002'
command: 'azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --loose' command: 'azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --loose'
volumes:
- ./azurite-root:/data
api: api:
container_name: root-api container_name: root-api
@@ -26,4 +28,7 @@ services:
context: . context: .
target: app target: app
ports: ports:
- '8080:8080' - '8080:8080'
volumes:
azurite-root:

View File

@@ -1,3 +1,10 @@
module "storage" {
source = "github.com/noahspannbauer/noahspan-terraform/modules/storage"
resource_group_name = var.RESOURCE_GROUP_NAME
storage_account_name = module.environment.storage_account_name
storage_tables = module.environment.storage_tables
}
module "container_app" { module "container_app" {
source = "github.com/noahspannbauer/noahspan-terraform/modules/container_app" source = "github.com/noahspannbauer/noahspan-terraform/modules/container_app"
app_subdomain_name = var.APP_SUBDOMAIN_NAME app_subdomain_name = var.APP_SUBDOMAIN_NAME
@@ -17,7 +24,6 @@ module "container_app" {
domain_name = var.DOMAIN_NAME domain_name = var.DOMAIN_NAME
log_analytics_workspace_name = module.environment.log_analytics_workspace_name log_analytics_workspace_name = module.environment.log_analytics_workspace_name
resource_group_name = var.RESOURCE_GROUP_NAME resource_group_name = var.RESOURCE_GROUP_NAME
storage_account_name = module.environment.storage_account_name storage_account_primary_connection_string = module.storage.storage_account_primary_connection_string
storage_tables = module.environment.storage_tables
tenant_id = var.TENANT_ID tenant_id = var.TENANT_ID
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@noahspan/noahspan-root", "name": "@noahspan/noahspan-root",
"version": "1.0.0", "version": "1.1.0",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"preprod": "rimraf ./.prod && pnpm --filter api build && pnpm --filter app build", "preprod": "rimraf ./.prod && pnpm --filter api build && pnpm --filter app build",

1272
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff