GithubHelp home page GithubHelp logo

nextjs-mnemonic-trainer's Introduction

Local Development

Installation

1. Start the MySQL database container:

$ docker-compose up -d

2. Configure environment variables:

$ cp .env.example .env
$ vim .env

3. Install dependencies:

$ npm install

4. Apply database migrations:

$ npx prisma migrate dev

5. Database seeding:

$ npx prisma db seed

6. Start the development server:

$ npm run dev

Production

Deployment

This project is deployed on Vercel and uses Neon as the managed PostgreSQL database. Follow these steps to deploy your application to production:

  1. Set up the database on Neon:

    • Create a new PostgreSQL database on Neon.
    • Note down the connection details provided by Neon.
  2. Set up environment variables on Vercel:

    • Go to your project settings on Vercel.
    • Add the required environment variables, including the database connection details from Neon, under the "Environment Variables" section.
  3. Deploy your application:

    • Push your code to the main branch of your repository.
    • Vercel will automatically detect the push and start the deployment process.
  4. Access your application:

    • Once the deployment is complete, you can access your application at the provided URL.

Database Migration and Seeding

Database migrations and seeding are automatically handled during the build process. Ensure that the build command in your package.json includes the necessary scripts:

"scripts": {
  "build": "prisma migrate deploy && prisma db seed && next build"
}

nextjs-mnemonic-trainer's People

Contributors

k0kishima avatar

Watchers

 avatar

nextjs-mnemonic-trainer's Issues

設定機能

10問固定じゃなくて任意の数を受験できるようにすべき

i18n対応

ログイン後の画面が全般的に英語しかない

管理画面

  • 単語のインポートとか
    • 今は本番で build 時に seed 流し込むとか適当にやってるのでこの機能実装時点でそれをやめるべき

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.