feat(backend,docker,docs): implement Go/Gin/SQLite REST API server, Docker containerization, and architecture specifications
- Implement standalone Go backend API server using Gin and pure-Go SQLite (modernc.org/sqlite) - Add 11-table schema DDL migrations (000001_init.up.sql) based on DATA_TABLE.md - Add seed data ingestion tool (cmd/seed) and static TypeScript content exporter (cmd/export-content) - Add configuration loader (internal/config) supporting environment variables and .env files (HOST, PORT, DB_PATH, GIN_MODE, CORS_ALLOW_ORIGINS, AUTO_MIGRATE) - Add lightweight multi-stage Dockerfile and docker-compose.yml with persistent SQLite volume - Add comprehensive architecture specification (ARCHITECTURE.md) and REST API interface specification (API_INTERFACE.md) - Harmonize frontend publications page to consume isHighlight flag from database-synced content
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type ResearchProject struct {
|
||||
ID int `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Abstract string `json:"abstract"`
|
||||
Keywords []string `json:"keywords"`
|
||||
Organization *string `json:"organization,omitempty"`
|
||||
StandardsOrg *string `json:"standards_org,omitempty"`
|
||||
Period *string `json:"period,omitempty"`
|
||||
Funder *string `json:"funder,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ResearchArea struct {
|
||||
ID int `json:"id"`
|
||||
NameEn string `json:"name_en"`
|
||||
NameKr *string `json:"name_kr,omitempty"`
|
||||
DisplayOrder int `json:"display_order"`
|
||||
}
|
||||
|
||||
type StatsSummary struct {
|
||||
IntlPublications int `json:"intl_publications"`
|
||||
StandardizationDocs int `json:"standardization_docs"`
|
||||
Patents int `json:"patents"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
type Course struct {
|
||||
ID int `json:"id"`
|
||||
SemesterID int `json:"semester_id"`
|
||||
Code string `json:"code"`
|
||||
NameEn string `json:"name_en"`
|
||||
NameKr *string `json:"name_kr,omitempty"`
|
||||
Note *string `json:"note,omitempty"`
|
||||
DisplayOrder int `json:"display_order"`
|
||||
}
|
||||
|
||||
type Semester struct {
|
||||
ID int `json:"id"`
|
||||
Year int `json:"year"`
|
||||
Term string `json:"term"`
|
||||
}
|
||||
|
||||
type SemesterWithCourses struct {
|
||||
ID int `json:"id"`
|
||||
Year int `json:"year"`
|
||||
Term string `json:"term"`
|
||||
Courses []Course `json:"courses"`
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Member struct {
|
||||
ID int `json:"id"`
|
||||
NameKo string `json:"name_ko"`
|
||||
NameEn string `json:"name_en"`
|
||||
Degree string `json:"degree"`
|
||||
Affiliation *string `json:"affiliation,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
IsAdvisor bool `json:"is_advisor"`
|
||||
DisplayOrder int `json:"display_order"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Alumnus struct {
|
||||
ID int `json:"id"`
|
||||
NameKo string `json:"name_ko"`
|
||||
NameEn string `json:"name_en"`
|
||||
Degree string `json:"degree"`
|
||||
GraduatedAt string `json:"graduated_at"`
|
||||
Major *string `json:"major,omitempty"`
|
||||
CurrentPosition *string `json:"current_position,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Publication struct {
|
||||
ID int `json:"id"`
|
||||
Category string `json:"category"`
|
||||
Title string `json:"title"`
|
||||
Authors *string `json:"authors,omitempty"`
|
||||
Venue string `json:"venue"`
|
||||
Volume *string `json:"volume,omitempty"`
|
||||
PublishedAt string `json:"published_at"`
|
||||
KCI bool `json:"kci"`
|
||||
DOI *string `json:"doi,omitempty"`
|
||||
IsHighlight bool `json:"is_highlight"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Patent struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Inventors string `json:"inventors"`
|
||||
ApplicationNo string `json:"application_no"`
|
||||
ApplicationAt string `json:"application_at"`
|
||||
RegistrationNo *string `json:"registration_no,omitempty"`
|
||||
RegistrationAt *string `json:"registration_at,omitempty"`
|
||||
Country string `json:"country"`
|
||||
PublishedAt string `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package models
|
||||
|
||||
type StandardDocument struct {
|
||||
ID int `json:"id"`
|
||||
BodyID int `json:"body_id"`
|
||||
WG string `json:"wg"`
|
||||
ProjectName string `json:"project_name"`
|
||||
Title string `json:"title"`
|
||||
DocRef string `json:"doc_ref"`
|
||||
Status string `json:"status"`
|
||||
PublishedAt *string `json:"published_at,omitempty"`
|
||||
}
|
||||
|
||||
type StandardProjectGroup struct {
|
||||
WG string `json:"wg"`
|
||||
Name string `json:"name"`
|
||||
Documents []StandardDocument `json:"documents"`
|
||||
}
|
||||
|
||||
type StandardsBody struct {
|
||||
ID int `json:"id"`
|
||||
Org string `json:"org"`
|
||||
FullName string `json:"full_name"`
|
||||
Scope string `json:"scope"`
|
||||
Period string `json:"period"`
|
||||
Role *string `json:"role,omitempty"`
|
||||
DisplayOrder int `json:"display_order"`
|
||||
}
|
||||
|
||||
type StandardsBodyWithProjects struct {
|
||||
ID int `json:"id"`
|
||||
Org string `json:"org"`
|
||||
FullName string `json:"full_name"`
|
||||
Scope string `json:"scope"`
|
||||
Period string `json:"period"`
|
||||
Role *string `json:"role,omitempty"`
|
||||
DisplayOrder int `json:"display_order"`
|
||||
Projects []StandardProjectGroup `json:"projects"`
|
||||
}
|
||||
Reference in New Issue
Block a user