https://github.com/lnsp/tum.events
Talk aggregator for TUM CS talks.
https://github.com/lnsp/tum.events
Last synced: 4 months ago
JSON representation
Talk aggregator for TUM CS talks.
- Host: GitHub
- URL: https://github.com/lnsp/tum.events
- Owner: lnsp
- License: apache-2.0
- Created: 2022-05-17T13:58:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-13T22:45:15.000Z (over 1 year ago)
- Last Synced: 2024-10-31T10:44:16.503Z (over 1 year ago)
- Language: Go
- Homepage: https://tum.events
- Size: 142 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TUM Events [](https://pkg.go.dev/github.com/lnsp/tum.events)
This is the source repository for the TUM Events service available at [tum.events](https://tum.events).
## Public sources
- https://www.net.in.tum.de/talks/
- https://db.in.tum.de/research/db_ag/?lang=de
- https://www.cs.cit.tum.de/sccs/aktuelles/sccs-kolloquium/
## Architecture
TUM Events uses Valar KV to store all talk data. Talks are stored in the format of `{prefix}_talks_{talkid}`.
The talk structure uses a minimal JSON format where a single character identifies a field. It is defined using
the following Go structure.
### Talks
```go
type Talk struct {
ID int64 `json:"i,omitempty"`
Rank int64 `json:"-"`
User string `json:"u"`
Title string `json:"t"`
Category string `json:"c"`
Date time.Time `json:"d"`
Link string `json:"l,omitempty"`
Body string `json:"b,omitempty"`
}
```
Thus, the following JSON block is a valid Talk doc.
```json
{
"i": 1,
"u": "go42tum",
"t": "title",
"c": "databases",
"d": "2022-05-18T10:00:00+02:00",
"l": "https://google.com"
}
```
Talks are synchronized if and only if the talk cache is empty OR the talk doc list changes.
### Login
```go
type Login struct {
Expiration time.Time `json:"e"`
User string `json:"u"`
Key string `json:"k"`
Code string `json:"c"`
Attempt int `json:"a"`
}
```
### Sessions
A session represents an authenticated user.
```go
type Session struct {
Expiration time.Time `json:"e"`
User string `json:"u"`
Key string `json:"k"`
}
```
### Verification
```go
type Verification struct {
Expiration time.Time `json:"e"`
Talk *Talk `json:"t"`
}
```
## Workflow
When developing locally, you most likely want to edit templates & run a local service instance.
```bash
# To continously render the tailwind.min.css styles, run the following command.
npx tailwindcss -i tailwind.css -m -w -o tailwind.min.css
# In a second terminal, run & restart the web service as you see fit.
DEBUG=true go run main.go
```