<commit_before># Journal

Written as a first attempt of a web-based project in Go, this is a simple web-
server driven blog with the ability to post new entries.

It makes use of a SQLite database to store the journal entries.

## Installation and Setup

1. Clone the repository to `$GOPATH/src/github.com/jamiefdhurst/journal`.
2. Make sure the `$GOPATH/data` directory exists.
3. Change directory to `$GOPATH/src/github.com/jamiefdhurst/journal`.
4. Run `go get` to install dependencies
5. Run `go build journal` to create the executable.
6. Run `./journal -mode=createdb` to create the database.
7. Run `./journal` to load the application on port 3000. You should now be able
    to fully access it at [](http://localhost:3000)

## Options

* `-mode=createdb` - Use to create the database within the data directory.
* `-port=3000` - Use to set the port to serve on for HTTP, defaults to 3000.

## Environment Variables

* `GIPHY_API_KEY` - Must be set to the GIPHY API key to use

## Layout

The project layout follows the standard set out in the following document:
https://github.com/golang-standards/project-layout

* `/api` - API documentation
* `/cmd/journal` - Main Journal executable folder
* `/internal/app/controller` - Controllers for the main application
* `/internal/app/model` - Models for the main application
* `/internal/app/router` - Implementation of router for given app
* `/pkg/adapter` - Adapters for connecting to external services
* `/pkg/controller` - Controller logic
* `/pkg/database` - Database connection logic
* `/pkg/router` - Router for handling services
* `/test` - API tests
* `/test/data` - Test data
* `/test/mocks` - Mock files for testing
* `/web/app` - CSS/JS source files
* `/web/static` - Compiled static public assets
* `/web/templates` - View templates<commit_msg>Add link to API docs<commit_after># Journal

Written as a first attempt of a web-based project in Go, this is a simple web-
server driven blog with the ability to post new entries.

It makes use of a SQLite database to store the journal entries.

[API Documentation](api/README.md)

## Installation and Setup

1. Clone the repository to `$GOPATH/src/github.com/jamiefdhurst/journal`.
2. Make sure the `$GOPATH/data` directory exists.
3. Change directory to `$GOPATH/src/github.com/jamiefdhurst/journal`.
4. Run `go get` to install dependencies
5. Run `go build journal` to create the executable.
6. Run `./journal -mode=createdb` to create the database.
7. Run `./journal` to load the application on port 3000. You should now be able
    to fully access it at [](http://localhost:3000)

## Options

* `-mode=createdb` - Use to create the database within the data directory.
* `-port=3000` - Use to set the port to serve on for HTTP, defaults to 3000.

## Environment Variables

* `GIPHY_API_KEY` - Must be set to the GIPHY API key to use

## Layout

The project layout follows the standard set out in the following document:
https://github.com/golang-standards/project-layout

* `/api` - API documentation
* `/cmd/journal` - Main Journal executable folder
* `/internal/app/controller` - Controllers for the main application
* `/internal/app/model` - Models for the main application
* `/internal/app/router` - Implementation of router for given app
* `/pkg/adapter` - Adapters for connecting to external services
* `/pkg/controller` - Controller logic
* `/pkg/database` - Database connection logic
* `/pkg/router` - Router for handling services
* `/test` - API tests
* `/test/data` - Test data
* `/test/mocks` - Mock files for testing
* `/web/app` - CSS/JS source files
* `/web/static` - Compiled static public assets
* `/web/templates` - View templates
{'fraction_non_alphanumeric': 0.10652827096421742, 'fraction_numerical': 0.012564872985523081, 'mean_word_length': 3.7931937172774868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1580311', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1080, 'n_words': 459}