Giter Club home page Giter Club logo

twi's Introduction

Twi

Fanfiction library engine

Setup

First of all, you'll need MySQL v8, Node.js v20 (latest version would be preferrable) and docker with docker compose (to run tests).

Before you begin:

  1. Create a .env.development.local file and fill with required environment variables
  2. Create a database with the name you specified in DB_NANE variable

Then, make sure to install the dependencies:

pnpm i

Development Server

Start the development server on http://localhost:3000:

pnpm run dev

Production

Build the application for production:

pnpm run build

Locally preview production build:

pnpm run preview

Environment variables

Name Required Default value Description
DB_NAME Yes Database name
DB_HOST No "localhost" Database server host
DB_PORT No 3306 Database server port
DB_USER Yes Database user
DB_PASSWORD Yes Database password
AUTH_ORIGIN Yes Server address for auth callbacks. The origin part of a URL
AUTH_SECRET Yes Auth secret for Cookies

twi's People

Contributors

octet-stream avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twi's Issues

Port setup script from CoffeeScipt

I have to rewrite all these things on JS from scratch.

Progress:

  • Refactor Twi binary. Done in 863cc92
  • Fixes for prompt helper. Also done in 863cc92
  • Add GraphQL support using Parasprite chainable API
  • Migrate from SPA arch to SSR (isomorphic) with Next.js
  • A lot architecture fixes and changes
  • Setup questions from here
  • The project is now using MongoDB instead of RDBMS. So, I have to rewrite all migrations to.
  • Add owner account sign up feature via the web interface and from the Twi CLI

CSS modules support

Well.. Everything's we're need to use Next.js works fine, but CSS modules doesn't work on server-side, because Node.js can't understand .css (and preprocessors for that) files. By the way, in future releases, require.extensions will be removed from Node.js API (not this one marked as deprecated. see: https://nodejs.org/api/globals.html#globals_require_extensions for more information) and we can't just use something like CSS Modules Require Hook

There are some alternative ways to use styles in SSR apps, like Styles Components or CSS-in-JS. Also, we can use just a global styles with a BEM for naming, but the last one is totally not our way.

So, we have to find a good way to use CSS in this project, or implement CSS Modules that will work both on client and server.

English docs

It will be nice if this repo got an English set of docs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.