Skip to content

A Forum made using Angular and Laravel, also mystart2impact final project

License

Notifications You must be signed in to change notification settings

Arm0ny/ForumProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


My Forum

An Awesome full-stack Forum made using Angular and Laravel
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

Built With

  • Angular
  • Laravel
  • Tailwind

(back to top)

Getting Started

Download th repo using this command inside terminal

git clone https://github.com/Arm0ny/ForumProject

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm

    npm install npm@latest -g
  • ng-cli

    npm install -g @angular/cli
  • php composer
    follow the instructions available here

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Clone the repo
    git clone https://github.com/Arm0ny/ForumProject
  2. cd inside front-end directory of the project
    cd ForumProject/front-end/
  3. install dependencies
    npm install
  4. serve the application and remember the port it's running on
    we will assume it's 4200
    ng serve
  5. cd inside forum-api directory
    cd ../forum-api
  6. install php dependencies
    composer install
  7. run the php server and remember the port it's running on we will assume it's on port 8000
    php artisan serve

Environment Setup

Back-end environment

to correctly run the application you need to setup some Laravel environment variables inside the forum-api folder

  1. create a new .env file inside the forum-api directory

  2. copy and paste the content from the .env.example

  3. change the database configuration parameters:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1     //your db host
    DB_PORT=3306          //your DB port
    DB_DATABASE=forum_api //your DB bame
    DB_USERNAME=root      //DB username
    DB_PASSWORD=          //password of the databse user
    
  4. add the front-end URL

    FRONTEND_URL=http://127.0.0.1:4200 //this should be the angural front-end url
    
  5. add the session data and stateful domains for sanctum configuration

    SESSION_LIFETIME=120
    SESSION_DOMAIN=127.0.0.1
    SANCTUM_STATEFUL_DOMAINS=127.0.0.1:4200 //the angular front-end URL
    
    
  6. generate an application key:

    php artisan key:generate
  7. run migrations:

    php artisan migrate

    this will create the databases tables and set up the back-end of the application

Front-end environment

now we need to do a few steps to make sure the correct back-end url is configured inside the front-end environment

  1. Go to the front-end library
  2. open the src/environments folder
  3. search for the development folder
  4. inside it you should find environment.development.ts file
  5. change this line to your back-end url
    BACKEND_URL : 'your back end url'
    

Serving the application

you are don!, now you only need to run two commands to run the application locally:

  1. inside forum-api
      php artisan serve
  2. inside forum front-end
    ng serve

(back to top)

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @your_twitter - email@example.com

Project Link: https://github.com/your_username/repo_name

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

About

A Forum made using Angular and Laravel, also mystart2impact final project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published