Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrisk committed Nov 20, 2024
0 parents commit e026b80
Show file tree
Hide file tree
Showing 42 changed files with 11,681 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# editorconfig.org
root = true

[*]
indent_style = tab # the ghoast of Dom will haunt you until the end if you change this
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# See http://stackoverflow.com/a/729795

[*.md]
trim_trailing_whitespace = false

[/**/fixture/**]
insert_final_newline = false
trim_trailing_whitespace = false
36 changes: 36 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Testing

on: [push]

jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/[email protected]
with:
node-version: '16.x'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Node version
run: node --version
- name: npm version
run: npm --version
- name: Yarn version
run: yarn --version

- run: yarn install --frozen-lockfile
- run: yarn test
114 changes: 114 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# ESlint reports
reports/

# jest_ci output
junit.xml

# OS
.DS_Store
.idea

# Editor
*.sublime-project
*.sublime-workspace
*.vscode

# Cypress
cypress/screenshots
cypress/videos
cypress/mock

package-lock.json

dist/

# Created by https://www.gitignore.io/api/vim
# Edit at https://www.gitignore.io/?templates=vim

### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

# End of https://www.gitignore.io/api/vim

temp/
/public
/dist
.cache
.next
.keystone
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.20.2
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
dist/
.keystone/
.next/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
proseWrap: 'preserve',
singleQuote: true,
trailingComma: 'es5',
useTabs: true,
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# TM Conversation Starter

This repository is part of the [Thinkmill](https://www.thinkmill.com.au/) interview process.
We call it a conversation starter because it is not a test or a task you have to do from scratch but a reduced example of what working at Thinkmill might look like.

## How do I get started?

Become familiar with the codebase so we can have a productive discussion about it. Don’t worry about the finer details—we’re not here to catch you out. The goal is simply to establish common ground. This should take approximately 30min.

## Running the project locally

In addition to reading the code and navigating the folder structure you might like to pull the repo and install all the dependencies.
We ship a `yarn.lock` file so please use [yarn v1](https://classic.yarnpkg.com/) to install dependencies.
For more information about Keystone [visit the docs](https://keystonejs.com/).

To run this project use:

```sh
yarn dev
```

You will have the following URLs available:

| Description | URL |
| ----------- | --------------------------------- |
| Site | http://localhost:4000 |
| Admin UI | http://localhost:3000/ |
| Graphiql | http://localhost:3000/api/graphql |
Binary file added cms/keystone-example.db
Binary file not shown.
10 changes: 10 additions & 0 deletions cms/keystone.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { config } from '@keystone-6/core';
import { lists } from './schema';

export default config({
db: {
provider: 'sqlite',
url: process.env.DATABASE_URL || 'file:./keystone-example.db',
},
lists,
});
22 changes: 22 additions & 0 deletions cms/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@thinkmill/conversation-starter-cms",
"version": "2.0.0",
"private": true,
"license": "MIT",
"scripts": {
"build": "keystone build",
"dev": "keystone dev",
"start": "keystone start"
},
"dependencies": {
"@keystone-6/core": "^1.1.0",
"@prisma/client": "^3.11.1"
},
"devDependencies": {
"prisma": "^3.11.1",
"typescript": "^4.5.5"
},
"engines": {
"node": "^14.15 || ^16.13"
}
}
Loading

0 comments on commit e026b80

Please sign in to comment.