GithubHelp home page GithubHelp logo

alikhan6 / demo-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 591 KB

A project for demo purpose in Flutter, TypeScript, PostgresQL and Sequelize

Kotlin 0.09% Ruby 1.73% Swift 1.16% Objective-C 0.02% Dart 63.91% CMake 11.80% C++ 14.20% C 0.92% HTML 1.19% TypeScript 3.69% JavaScript 1.30%

demo-project's Introduction

Demo Project

This project contains both the frontend and backend of an application. The frontend is developed using Flutter, and the backend is developed using TypeScript with Sequelize Postgres.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js and npm installed. You can download them from nodejs.org.
  • Flutter SDK installed. You can follow the instructions from the official Flutter documentation.
  • PostgreSQL installed and running. You can download it from postgresql.org.
  • Any IDE or text editor, such as VS Code or IntelliJ IDEA.

Frontend Setup (Flutter)

  1. Clone the repository:
    git https://github.com/AliKhan6/Demo-project.git
    cd Demo-project/mobile-app
    
  2. Install dependencies: flutter pub get
  3. Run the Flutter app: flutter pub get

Backend Setup (TypeScript with Sequelize)

cd typescript-backend/

  1. npm install

  2. Configure environment variables: Create a config.json file in the backend directory and add below details into it.

  "dev": {
    "database": "testingDB",
    "dialect": "postgres",
    "username": "root",
    "password": "testingDB-pass",
    "host": "127.0.0.1",
    "AUTH_SECRET":"GF3K1kgs0eHvUJDEGD28AawsDfcW1BgnrnPYmmRCZgs="
  },
  "test": {
    "database": "testingDB",
    "dialect": "postgres",
    "username": "root",
    "password": "database_test",
    "host": "127.0.0.1"
  },
  "prod": {
    "username": "root",
    "password": null,
    "database": "database_production",
    "host": "127.0.0.1",
    "dialect": "mysql"
  }
}
  1. Set Environment variable: export NODE_ENV=dev --// For Mac or Linux users set NODE_ENV=dev --// For windows users
  2. Run database migrations: npx sequelize-cli db:migrate --config "config.json"
  3. Start backend Server: npm run dev or nodemon dev

Running the Project To run the project, follow these steps:

  1. Start the backend server: Navigate to the backend directory and start the server. cd typescript-backend/ npm run dev OR nodemon dev

  2. Run the Flutter app: Navigate to the frontend directory and run the app. cd mobile-app/ flutter run

Now your project should be up and running. The Flutter app will be served on your device/emulator, and the backend server will be running locally.

demo-project's People

Contributors

alikhan6 avatar

Watchers

 avatar

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.