Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
4b7a22b
initial backend setup + error cleanup
rjuvekar137 Sep 17, 2025
3323502
create anthology entity
builderpepc Oct 4, 2025
718d69e
add anthology service
builderpepc Oct 4, 2025
f5d38bf
feature: added anthology controller
Oct 5, 2025
234c738
restore the example.env to the default template
Oct 5, 2025
1792de1
added library controller, entity, module, service
robpatterson13 Oct 5, 2025
deb0728
actually saved library files this time
robpatterson13 Oct 5, 2025
784f17d
story service file
IsabellaB876 Oct 5, 2025
2c22884
Merge pull request #17 from alaatamam/feature/anthology-controller
alaatamam Oct 12, 2025
c2c73ec
Implemented Anthology Module and small update to Anthology Controller
Oct 12, 2025
95b96a0
Merge branch 'main' into feature/anthology-module
alaatamam Oct 12, 2025
76a306d
Merge pull request #22 from alaatamam/feature/anthology-module
alaatamam Oct 12, 2025
c29f586
Merge pull request #19 from Code-4-Community/create-story-entity
alaatamam Oct 12, 2025
eed27a1
removed unnecessary imports from library controller
robpatterson13 Oct 13, 2025
018489f
Merge pull request #23 from Code-4-Community/rob-library
robpatterson13 Oct 13, 2025
305e3ef
adding to story controller + module
IsabellaB876 Oct 18, 2025
0a6d987
add API route to get anthologies from library instances
builderpepc Oct 19, 2025
6beaf82
add tests for Library
builderpepc Oct 19, 2025
232a32c
add endpoint to create anthologies, and tests
builderpepc Oct 19, 2025
eeef949
Merge pull request #24 from Code-4-Community/troy/new-library-endpoints
alaatamam Oct 19, 2025
4a58890
done
SlothfulDreams Oct 26, 2025
9f3294a
controller and dto
IsabellaB876 Nov 2, 2025
9f9eaaf
dto file
IsabellaB876 Nov 2, 2025
27967b7
add optional publishing_name field on User
builderpepc Nov 9, 2025
f2c91d7
Merge pull request #30 from Code-4-Community/bz-update-anthology
SlothfulDreams Nov 12, 2025
2a52b52
Add DELETE /anthology/:id endpoint with 200 response and 404 handling
Nov 22, 2025
dc5d1ca
Merge pull request #47 from alaatamam/feature/delete-endpoint-antho
alaatamam Nov 22, 2025
6d04c75
feat: implement Archived Publications page with modal interaction
Nov 22, 2025
7096b6e
feat: add dynamic search filtering for archived publications (title +…
Nov 22, 2025
4e837fb
feat: add dynamic search filtering + author byline to archived public…
Nov 22, 2025
a8b5fbc
Merge pull request #32 from Code-4-Community/troy-user-changes
builderpepc Nov 22, 2025
2cc7c00
implement individual publication UI
builderpepc Nov 23, 2025
10174f5
UI updates
builderpepc Nov 23, 2025
789134a
add unimplemented fields to frontend model
builderpepc Nov 23, 2025
74a93f1
format
builderpepc Nov 23, 2025
fd3f3f6
updated typescript + eslint versions (linter issue)
rjuvekar137 Nov 23, 2025
db10382
Merge pull request #50 from Code-4-Community/troy-publication-view
builderpepc Dec 1, 2025
72a3786
Merge branch 'main' into feature/archived-publications
rjuvekar137 Dec 2, 2025
df8c2e5
Merge pull request #48 from alaatamam/feature/archived-publications
IsabellaB876 Dec 3, 2025
3af472f
ui
SlothfulDreams Dec 3, 2025
aed4954
Merge pull request #49 from alaatamam/feature/archived-publications-s…
rjuvekar137 Dec 4, 2025
436991d
navigation between archive + publication view
rjuvekar137 Dec 4, 2025
0046fa5
merge conflict fix
SlothfulDreams Dec 4, 2025
0045cd5
Merge pull request #55 from Code-4-Community/ui/bz-archive-pub-page
SlothfulDreams Dec 4, 2025
1ddd089
Merge branch 'main' into rj-navigation-styling
rjuvekar137 Dec 4, 2025
0eb0f12
merge conflict fix
rjuvekar137 Dec 4, 2025
325d0b9
added side bar to the individual publication view
rjuvekar137 Dec 4, 2025
0e025ed
same mock data for publications + archive
rjuvekar137 Dec 4, 2025
3a395f6
added sample data provided
rjuvekar137 Dec 4, 2025
27f9c6e
minor navigation mismatch
rjuvekar137 Dec 4, 2025
c30ac20
edits to tag styling
rjuvekar137 Dec 4, 2025
8226222
changed image styling for individiual pub view
rjuvekar137 Dec 4, 2025
7784f9c
Merge pull request #54 from Code-4-Community/rj-navigation-styling
rjuvekar137 Dec 5, 2025
ae10dee
Merge branch 'main' of https://github.com/Code-4-Community/826-boston…
rjuvekar137 Dec 5, 2025
c765015
Merge pull request #31 from Code-4-Community/get-post-story-endpoints
rjuvekar137 Dec 5, 2025
6617240
changed placeholder image
rjuvekar137 Dec 5, 2025
69e15f4
Merge pull request #56 from Code-4-Community/rj-individual-pub-styling
rjuvekar137 Dec 5, 2025
7fee1ee
completion of ticket 58
naman0r Jan 24, 2026
02fc2ee
BOS-61: refactored backend entities
Ryaken-Nakamoto Jan 24, 2026
551e0d3
delete unused root folder
GauriRajesh733 Jan 25, 2026
3784afa
BOS-61: add migrations
Ryaken-Nakamoto Jan 25, 2026
98f1d81
Merge pull request #65 from Code-4-Community/61-backend-classes
josieek Jan 26, 2026
43c8366
added author display to indiv pub page
rjuvekar137 Jan 27, 2026
5e72fc8
added ellipses to archive page author display
rjuvekar137 Jan 27, 2026
8c775bf
added mock stories for all current anthologies
rjuvekar137 Jan 27, 2026
deea51d
seed data
GauriRajesh733 Jan 27, 2026
eb3d732
test commit
GauriRajesh733 Jan 29, 2026
571966d
changed may tsconfig, project.json files to fix dependency and deprec…
josieek Jan 29, 2026
e4094ab
eliminated circular dependencies in the backend
josieek Jan 29, 2026
b5a3d1f
Merge branch 'gr-jk-seed-data' of https://github.com/Code-4-Community…
josieek Jan 29, 2026
37b992f
BOS-68: create/test story+anth endpoints
Ryaken-Nakamoto Jan 29, 2026
edb364f
Make individual publication page responsive
Feb 1, 2026
a86b0d2
created DTOs for production-info
naman0r Feb 1, 2026
da8d41d
imports
naman0r Feb 1, 2026
357cdf9
production info impl
naman0r Feb 2, 2026
255d2cc
BOS-67: add story draft entity
Ryaken-Nakamoto Feb 2, 2026
395a821
Merge pull request #80 from Code-4-Community/gr-jk-seed-data
josieek Feb 2, 2026
cff0c42
removed story draft field from Author
josieek Feb 2, 2026
e275ce8
added column decorator to authorId in StoryDraft
josieek Feb 2, 2026
738e6bb
maade submissionRound and editRound columns enums with @Column decorator
josieek Feb 2, 2026
f3a3eed
Merge pull request #79 from Code-4-Community/67-story-draft
josieek Feb 2, 2026
f463050
removed anthology field and added unique constraint to anthologyId
josieek Feb 3, 2026
42a9dcc
added id and region to aws-eports.ts
josieek Feb 4, 2026
0c8a934
added unused imports
josieek Feb 4, 2026
df131e0
migrations changed to compile js instead of ts. added author dto and …
josieek Feb 4, 2026
5ec286f
deleted error.log
josieek Feb 4, 2026
36e0bec
Merge pull request #82 from Code-4-Community/81-configure-cognito
josieek Feb 5, 2026
596becd
Merge branch 'main' of https://github.com/Code-4-Community/826-boston…
josieek Feb 5, 2026
372abe7
[main] crucial project dependencies
SushiS1ay3r Feb 5, 2026
9796de0
Merge branch 'main' of https://github.com/Code-4-Community/826-boston
SushiS1ay3r Feb 5, 2026
382a7e6
BOS-68: revised to exclude typeorm relationship decs
Ryaken-Nakamoto Feb 6, 2026
5f8a351
resolve merge conflicts
GauriRajesh733 Feb 7, 2026
21239d6
Merge pull request #74 from Code-4-Community/60-individual-publicatio…
GauriRajesh733 Feb 7, 2026
390f096
update library icon to match figma
GauriRajesh733 Feb 7, 2026
4779f45
Merge pull request #64 from Code-4-Community/nr-ticket/58
GauriRajesh733 Feb 7, 2026
bc43160
Merge branch 'main' of https://github.com/Code-4-Community/826-boston…
josieek Feb 10, 2026
4872adb
Merge branch 'main' into nr-ticket-73
josieek Feb 10, 2026
630854a
made dependency changes, had to resolve conflicts from other backend …
josieek Feb 10, 2026
27f24aa
removed ! and ? from production info since strict requirements removed
josieek Feb 10, 2026
40b9dbe
added omchai entity + user updates
rjuvekar137 Feb 11, 2026
2f9c9a2
Merge pull request #75 from Code-4-Community/68-story-anth-entity
josieek Feb 11, 2026
7249935
Revert "BOS-68: create/test story+anth endpoints"
josieek Feb 11, 2026
21b55ba
Merge pull request #88 from Code-4-Community/revert-75-68-story-anth-…
josieek Feb 11, 2026
2b25579
changed ignore deprecations
josieek Feb 11, 2026
7f2cf4d
Merge pull request #89 from Code-4-Community/68-story-anth-entity
josieek Feb 11, 2026
136ace9
db migration
rjuvekar137 Feb 12, 2026
03ce5c2
testing
rjuvekar137 Feb 12, 2026
7677e8c
Merge branch 'main' of https://github.com/Code-4-Community/826-boston…
rjuvekar137 Feb 12, 2026
a5cd579
testing
rjuvekar137 Feb 12, 2026
5dab1a5
Merge pull request #90 from Code-4-Community/70-OMCHAI-routes
josieek Feb 12, 2026
b05f9ed
Merge branch 'main' into fix/publication-responsive-59
GauriRajesh733 Feb 14, 2026
1a189cb
vertical resizing and added nx cache to gitignore
GauriRajesh733 Feb 14, 2026
875ab28
Merge pull request #76 from alaatamam/fix/publication-responsive-59
GauriRajesh733 Feb 14, 2026
27546fa
merge main into branch
GauriRajesh733 Feb 15, 2026
bec7874
migrations
naman0r Feb 15, 2026
cdddc75
production infi impl
naman0r Feb 15, 2026
29dc9e9
changed ignoreddeprecations from 5 to 6
josieek Feb 17, 2026
8980aa0
Merge pull request #78 from Code-4-Community/nr-ticket-73
josieek Feb 17, 2026
22c6817
Merge branch 'main' of https://github.com/Code-4-Community/826-boston…
josieek Feb 17, 2026
69e9ec4
added seed back to backend/project.json
josieek Feb 19, 2026
057771e
added an anthology example
josieek Feb 19, 2026
993a771
added more fields to anthology
josieek Feb 19, 2026
ac7e0cd
seeded anthology
josieek Feb 20, 2026
b62ddb6
seeded authors
josieek Feb 20, 2026
1be8b83
seeded data for all tables except for story draft and production info
josieek Feb 20, 2026
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ Thumbs.db
# Environment file
*.env
*.env.*
!example.env
!example.env

# Cache
.nx/cache
Binary file added .nx/workspace-data/nx_files.nxt
Binary file not shown.
6 changes: 6 additions & 0 deletions apps/backend/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
"production": {}
}
},
"seed": {
"executor": "nx:run-commands",
"options": {
"command": "ts-node -r tsconfig-paths/register --project apps/backend/tsconfig.seed.json apps/backend/src/seeds/index.ts"
}
},
"serve": {
"executor": "@nx/js:node",
"defaultConfiguration": "development",
Expand Down
50 changes: 50 additions & 0 deletions apps/backend/src/anthology/anthology.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import {
Controller,
Get,
Delete,
Param,
ParseIntPipe,
UseGuards,
UseInterceptors,
NotFoundException,
} from '@nestjs/common';
import { AnthologyService } from './anthology.service';
import { Anthology } from './anthology.entity';
import { AuthGuard } from '@nestjs/passport';
import { CurrentUserInterceptor } from '../interceptors/current-user.interceptor';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';

@ApiTags('Anthologies')
@ApiBearerAuth()
@Controller('anthologies')
@UseGuards(AuthGuard('jwt'))
@UseInterceptors(CurrentUserInterceptor)
export class AnthologyController {
constructor(private readonly anthologyService: AnthologyService) {}

@Get(':id')
async getAnthology(
@Param('id', ParseIntPipe) id: number,
): Promise<Anthology> {
const anthology = await this.anthologyService.findOne(id);

if (!anthology) {
throw new NotFoundException(`Anthology with ID ${id} not found`);
}

return anthology;
}

@Get()
async getAllAnthologies(): Promise<Anthology[]> {
return this.anthologyService.findAll();
}

@Delete('/:anthologyId')
async removeAnthology(
@Param('anthologyId', ParseIntPipe) anthologyId: number,
): Promise<{ message: string }> {
await this.anthologyService.remove(anthologyId);
return { message: 'Anthology deleted successfully' };
}
}
100 changes: 100 additions & 0 deletions apps/backend/src/anthology/anthology.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import {
Entity,
Column,
IntegerType,

Check warning on line 4 in apps/backend/src/anthology/anthology.entity.ts

View workflow job for this annotation

GitHub Actions / pre-deploy

'IntegerType' is defined but never used
PrimaryGeneratedColumn,
OneToMany,
ManyToOne,

Check warning on line 7 in apps/backend/src/anthology/anthology.entity.ts

View workflow job for this annotation

GitHub Actions / pre-deploy

'ManyToOne' is defined but never used
OneToOne,
Relation,
} from 'typeorm';

import { AnthologyStatus, AnthologyPubLevel, AgeCategory } from './types';

import { Story } from '../story/story.entity';
import { InventoryHolding } from '../inventory-holding/inventory-holding.entity';
import { ProductionInfo } from '../production-info/production-info.entity';
import { Omchai } from 'src/omchai/omchai.entity';

Check warning on line 17 in apps/backend/src/anthology/anthology.entity.ts

View workflow job for this annotation

GitHub Actions / pre-deploy

'Omchai' is defined but never used

@Entity()
export class Anthology {
@PrimaryGeneratedColumn()
id: number;

@Column()
title: string;

@Column({ default: '' })
byline: string;

@Column({ nullable: true })
subtitle: 'A College Essay Anthology';

@Column()
description: string;

@Column({ type: 'simple-array', default: [] })
genres: string[];

@Column({ type: 'simple-array', default: [] })
themes: string[];

@Column({ type: 'simple-array', default: [] })
triggers: string[];

@Column({ name: 'published_date', type: 'date' })
publishedDate: Date;

@Column({ type: 'simple-array', nullable: true })
programs?: string[];

@Column({ type: 'simple-array', nullable: true })
sponsors?: string[];

@Column({ type: 'enum', enum: AnthologyStatus })
status: AnthologyStatus;

@Column({
type: 'enum',
enum: AgeCategory,
name: 'age_category',
nullable: true,
})
ageCategory: AgeCategory;

@Column({
name: 'pub_level',
type: 'enum',
enum: AnthologyPubLevel,
})
pubLevel: AnthologyPubLevel;

@Column({
name: 'photo_url',
nullable: true,
default: '',
})
photoUrl: string;

@Column({ nullable: true })
isbn: string;

@Column({
name: 'shopify_url',
nullable: true,
default: '',
})
shopifyUrl: string;

@OneToMany(() => Story, (story) => story.anthology)
stories: Relation<Story[]>;

@OneToMany(() => InventoryHolding, (holding) => holding.anthology)
inventoryHoldings: Relation<InventoryHolding[]>;

@OneToOne(
() => ProductionInfo,
(productionInfo) => productionInfo.anthology_id,
)
productionInfo: ProductionInfo;
}
18 changes: 18 additions & 0 deletions apps/backend/src/anthology/anthology.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AnthologyController } from './anthology.controller';
import { AnthologyService } from './anthology.service';
import { Anthology } from './anthology.entity';
import { AuthService } from '../auth/auth.service';

Check warning on line 6 in apps/backend/src/anthology/anthology.module.ts

View workflow job for this annotation

GitHub Actions / pre-deploy

'AuthService' is defined but never used
import { JwtStrategy } from '../auth/jwt.strategy';

Check warning on line 7 in apps/backend/src/anthology/anthology.module.ts

View workflow job for this annotation

GitHub Actions / pre-deploy

'JwtStrategy' is defined but never used
import { CurrentUserInterceptor } from '../interceptors/current-user.interceptor';
import { AuthModule } from '../auth/auth.module';
import { UsersModule } from '../users/users.module';

@Module({
imports: [TypeOrmModule.forFeature([Anthology]), AuthModule, UsersModule],
controllers: [AnthologyController],
providers: [AnthologyService, CurrentUserInterceptor],
exports: [AnthologyService],
})
export class AnthologyModule {}
98 changes: 98 additions & 0 deletions apps/backend/src/anthology/anthology.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';

import { Anthology } from './anthology.entity';
import { AnthologyStatus, AnthologyPubLevel } from './types';

@Injectable()
export class AnthologyService {
constructor(
@InjectRepository(Anthology) private repo: Repository<Anthology>,
) {}

async create(
title: string,
description: string,
publishedDate: string,
status: AnthologyStatus,
pubLevel: AnthologyPubLevel,
programs?: string[],
photoUrl?: string,
isbn?: string,
shopifyUrl?: string,
) {
const anthologyId = (await this.repo.count()) + 1;
const anthology = this.repo.create({
id: anthologyId,
title,
description,
publishedDate,
status,
pubLevel,
programs,
photoUrl,
isbn,
shopifyUrl,
});

return this.repo.save(anthology);
}

findOne(id: number) {
if (!id) {
return null;
}

return this.repo.findOneBy({ id });
}

findAll() {
return this.repo.find();
}

findByStatus(status: AnthologyStatus) {
return this.repo.find({ where: { status } });
}

findByPubLevel(pubLevel: AnthologyPubLevel) {
return this.repo.find({ where: { pubLevel } });
}

findByYear(publishedDate: Date) {
return this.repo.find({ where: { publishedDate } });
}

async update(id: number, attrs: Partial<Anthology>) {
const anthology = await this.findOne(id);

if (!anthology) {
throw new NotFoundException('Anthology not found');
}

Object.assign(anthology, attrs);

return this.repo.save(anthology);
}

async remove(id: number) {
const anthology = await this.findOne(id);

if (!anthology) {
throw new NotFoundException('Anthology not found');
}

return this.repo.remove(anthology);
}

async updateStatus(id: number, status: AnthologyStatus) {
const anthology = await this.findOne(id);

if (!anthology) {
throw new NotFoundException('Anthology not found');
}

anthology.status = status;
return this.repo.save(anthology);
}
}
79 changes: 79 additions & 0 deletions apps/backend/src/anthology/dtos/create-anthology.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import {
IsString,
IsNumber,
IsOptional,
IsEnum,
IsArray,
} from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { AnthologyStatus, AnthologyPubLevel } from '../types';

//TODO: outdated DTO needs to match the schema
export class CreateAnthologyDto {
@ApiProperty({ description: 'Title of the anthology' })
@IsString()
title: string;

@ApiProperty({ description: 'Description of the anthology' })
@IsString()
description: string;

@ApiProperty({ description: 'Year the anthology was published' })
@IsNumber()
published_year: number;

@ApiProperty({
description: 'Status of the anthology',
enum: AnthologyStatus,
example: AnthologyStatus.DRAFTING,
})
@IsEnum(AnthologyStatus)
status: AnthologyStatus;

@ApiProperty({
description: 'Publication level of the anthology',
enum: AnthologyPubLevel,
example: AnthologyPubLevel.ZINE,
})
@IsEnum(AnthologyPubLevel)
pub_level: AnthologyPubLevel;

@ApiPropertyOptional({
description: 'Programs associated with the anthology',
type: [String],
})
@IsOptional()
@IsArray()
@IsString({ each: true })
programs?: string[];

@ApiPropertyOptional({ description: 'Inventory count' })
@IsOptional()
@IsNumber()
inventory?: number;

@ApiPropertyOptional({ description: 'URL to anthology photo' })
@IsOptional()
@IsString()
photo_url?: string;

@ApiPropertyOptional({ description: 'Genre of the anthology' })
@IsOptional()
@IsString()
genre?: string;

@ApiPropertyOptional({ description: 'Theme of the anthology' })
@IsOptional()
@IsString()
theme?: string;

@ApiPropertyOptional({ description: 'ISBN of the anthology' })
@IsOptional()
@IsString()
isbn?: string;

@ApiPropertyOptional({ description: 'Shopify URL for purchasing' })
@IsOptional()
@IsString()
shopify_url?: string;
}
4 changes: 4 additions & 0 deletions apps/backend/src/anthology/dtos/update-anthology.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreateAnthologyDto } from './create-anthology.dto';

export class UpdateAnthologyDto extends PartialType(CreateAnthologyDto) {}
17 changes: 17 additions & 0 deletions apps/backend/src/anthology/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export enum AnthologyStatus {
ARCHIVED = 'Archived',
NOT_STARTED = 'NotStarted',
DRAFTING = 'Drafting',
CAN_BE_SHARED = 'CanBeShared',
}

export enum AnthologyPubLevel {
ZINE = 'Zine',
CHAPBOOK = 'Chapbook',
PERFECT_BOUND = 'PerfectBound',
SIGNATURE = 'Signature',
}

export enum AgeCategory {
YA = 'Young Adult Books (Ages 13-18)',
}
Loading