Skip to content

Commit 9562a81

Browse files
committed
improve readme
1 parent 9ca3197 commit 9562a81

File tree

2 files changed

+31
-96
lines changed

2 files changed

+31
-96
lines changed

VinePlus.Web/Pages/Stats/User.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@page
1+
@page
22
@using VinePlus.Web.Pages
33
@model VinePlus.Web.Pages.Stats.User
44

VinePlus.Web/README.md

Lines changed: 30 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# VinePlus.Web
22

3-
Web frontend and RESTful api interface for VinePlus.
4-
Supports fetching content from either a local postgres database or directly from comicvine servers.
3+
VinePlus is a different way to browse the ComicVine forum. It saves forum content in a PostgreSQL database, making it easier to add features like better search and filtering. The app also gets live updates directly from ComicVine servers, so users always have the latest content
54

6-
## Features
5+
## 1. Features
76
- Viewing posts, threads, and blog made by a specific user
87
- Viewing deleted posts
98
- Sorting threads by number of posts, views, and date created
@@ -12,107 +11,43 @@ Supports fetching content from either a local postgres database or directly from
1211
- searching posts made by a specific user
1312
- lots of stats for users, threads, and posts etc.
1413

15-
## How to set up the database
14+
## 2. Prerequisites
15+
- Make sure you have [.net 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) installed
16+
- PostgreSQL
17+
- dotnet-ef tool `dotnet tool install --global dotnet-ef`
1618

17-
- Install postgresql
19+
## 3. Setting up the database
20+
### 3.1. Setting up postgres
1821
- Create a database with the name `comic_vine`
19-
- Add the connection string with the name `comicvine_db` to the appsettings.json file or add as an environment variable in the form: `ConnectionStrings:comicvine_db=<connectionstring>`
20-
- Hydrate the database
22+
- Add the connection string named `comicvine_db` either to the appsettings.json file or as an environment variable in the format: `ConnectionStrings:comicvine_db=<connectionstring>`
2123

22-
## How to hydrate the database
24+
### 3.2. Initializing schema
25+
You can update the database to the latest schema through either of these ways:
26+
- Navigate to the [database project](../VinePlus.Database) and run the `migrations.sql` script, or...
27+
- Run `dotnet-ef database update` (make sure you've set up the connection strings)
2328

24-
The database can be hydrated in two methods. You can either download all the data from comicvine's servers or restore the database from an backup.
29+
### 3.3. Seeding the database
2530

26-
### Method 1
27-
- Change directory to this folder
28-
- install dotnet ef `dotnet tool install --global dotnet-ef`
29-
- push migrations to the database with `dotnet-ef database update --connection="connection string"`. Now the schema is on the db
30-
- Build the [seed project](../VinePlus.Seed/README.md)
31-
- Follow the instructions there to download the data in CSV files
32-
- import the generated csv file into the database with pgadmin or any other method of your choice
31+
The database can be hydrated in two methods. You can either directly download all the data from comicvine's servers or restore the database from a backup.
3332

34-
### Method 2
35-
- download a [database dump](https://mega.nz/file/KX4kCCzL#ue4ZPxWDqRYBjCQSeww_M_aOsTonAkKKwo2yWHIlcDQ)
36-
- restore the dump to the database with `pg_restore -v -h <postgres-server-address> -U <username> -d <databasename> -j 2 comicvine_seed_v1`
33+
#### 3.3.1 - Seeding database from backup
34+
- Download the [latest backup](https://mega.nz/file/KX4kCCzL#ue4ZPxWDqRYBjCQSeww_M_aOsTonAkKKwo2yWHIlcDQ)
35+
- Restore the dump to the database with `pg_restore -v -h <postgres-server-address> -U <username> -d <databasename> -j 2 comicvine_seed_v1`
3736
- after a while, all the tables, and data should be restored
37+
- **NOTE:** The backup might not have the most recent data
3838

39-
## Method 3
40-
- navigate to `VinePlus.Database`
41-
- run `migrations.sql`. this would initialize the schema
42-
- then you can populate the data with either method 1 or 2
43-
44-
The first can be time consuming - especially on low internet speed, while the backup might not have the most recent data
39+
#### 3.3.2 - Seeding database directly
40+
- Build the [seed project](../VinePlus.Seed/README.md)
41+
- Follow the instructions there to download the data in CSV files
42+
- import the generated csv file into the database with pgadmin or any other method of your choice
43+
- **NOTE:** This can be time-consuming on low internet speed
4544

46-
### How to run
47-
- make sure you have net9 (you can check installed sdks with `dotnet --list-sdks`)
48-
- You can either run the project with `dotnet run` or download the latest release and run with `dotnet VinePlus.Web.dll`
49-
- *make sure the database is initialized and the connection string is stored in `appsettings.json` or as the `ConnectionStrings:comicvine_db` environment variable as described earlier*
45+
### 3.4 Running VinePlus
46+
- Make sure the database is set up.
47+
- Run the command `dotnet run`. This will build the project, restore any necessary files, and then execute it.
48+
- You can also download the latest release from the GitHub Releases section and run the prebuilt application using `dotnet VinePlus.Web.dll`
5049

51-
## TODO
52-
- [x] improve styling
53-
- [x] responsive UI
54-
- [x] refactor internals
55-
- [x] add polling worker
56-
- [x] default error pages for web interface
57-
- [x] error handling for deactivated profiles
58-
- [x] add footer linking to api on forums
59-
- [ ] ~~add ui icons for polls and stuff~~
60-
- [x] better error pages
50+
### TODO
6151
- [ ] validation for forms
62-
63-
### Posts
64-
- [x] fix youtube video in posts (http://localhost:5119/archives/thread/2308691#11)
65-
- [x] add time stamp to posts
66-
- [x] ui improvements on timestamp
67-
- [x] change color of edited button
68-
- [x] add way to copy link to a specific post
69-
70-
### Threads
71-
- [ ] ~~ability to sort threads by different criteria~~
72-
- [x] thread should have a link to the og post on cv
73-
- [x] shows full title of thread on hover
74-
- [x] forum should be able to link to the last post
75-
76-
### Profile
77-
- [x] make images and blogs on user profile optional
78-
- [x] refactors for thread and post view on user profile (and errors for deactivated accounts)
79-
- [ ] ?? more stuff on deactivated users ??
80-
- [x] fallbacks when profile not found
81-
- [ ] ~~different color for nav header~~
82-
- [ ] ?? add stats user ??
83-
84-
### Search
85-
- [x] add search
86-
- [x] search from user
87-
- [ ] ~~possibly filter thread search by board, type~~
8852
- [ ] "How to search" UI
89-
- [x] pagination for search
90-
- [x] add ability to search posts
91-
- [x] highlight search term
92-
93-
### Stats
94-
- [x] add stats UI
95-
- [x] board stats
96-
- [x] viewing all threads a user has posted in, and number of posts
97-
- [x] stats for number of posts, and threads a user has made
98-
99-
### Api
100-
- [ ] better styling for api documentation
101-
- [ ] more documentation for api
102-
- [ ] add format for api errors
103-
104-
### Users archives
105-
- [x] posts view in user profile should have link to the thread
106-
- [x] there should be a way to link to a specific post in a thread
107-
108-
## Archives
109-
- [x] sorting of threads by no of posts
110-
- [x] sorting by various parameters
111-
- [x] UI option to change sort type
112-
- [ ] ~~sorting of posts by date created~~
113-
- [x] highlight for deleted posts
114-
115-
## Tables
116-
- [x] add indexes on `posts.created`,`creator->>'Text'`.
117-
- [x] remove unnecessary columns in queries
118-
- [ ] search data structure for threads, and posts
53+
- [ ] search data structure for threads, and posts

0 commit comments

Comments
 (0)